@@ -61,11 +61,10 @@ export const authQueries = {
6161** Usage in components:**
6262
6363``` typescript
64- import { FlatList } from ' react-native' ;
6564import { StyleSheet } from ' react-native-unistyles' ;
6665import { useQuery } from ' @/hooks/useQuery/useQuery' ;
6766import { authQueries } from ' @/api/actions/auth/auth.queries' ;
68- import { Typography , Box , Loader } from ' @/components/ui' ;
67+ import { Typography , Box , Loader , List } from ' @/components/ui' ;
6968
7069const UsersList = () => {
7170 // List with parameters using query factory
@@ -92,12 +91,13 @@ const UsersList = () => {
9291
9392 return (
9493 < Box style = {styles.container }>
95- < FlatList
96- data = {usersResponse?.users }
94+ < List
95+ data = {usersResponse?.users || [] }
9796 keyExtractor={(item) => item.id}
9897 renderItem={({ item }) => (
9998 <Typography>{item.name}</Typography>
10099 )}
100+ estimatedItemSize={60}
101101 />
102102 </Box>
103103 );
@@ -234,11 +234,11 @@ export const authQueries = {
234234**Usage:**
235235
236236` ` ` typescript
237- import { FlatList , Pressable } from ' react-native' ;
237+ import { Pressable } from ' react-native' ;
238238import { StyleSheet } from ' react-native-unistyles' ;
239239import { useInfiniteQuery } from ' @/hooks/useInfiniteQuery/useInfiniteQuery' ;
240240import { authQueries } from ' @/api/actions/auth/auth.queries' ;
241- import { Typography , Box } from ' @/components/ui' ;
241+ import { Typography , Box , List } from ' @/components/ui' ;
242242
243243const InfiniteUsersList = () => {
244244 const {
@@ -276,13 +276,14 @@ const InfiniteUsersList = () => {
276276
277277 return (
278278 < Box style = {styles.container }>
279- < FlatList
279+ < List
280280 data = {allUsers }
281281 keyExtractor = {(item) => item.id }
282282 renderItem = {renderUser }
283283 ListFooterComponent = {renderFooter }
284284 onEndReached = {() => hasNextPage && fetchNextPage()}
285285 onEndReachedThreshold = {0.5 }
286+ estimatedItemSize = {80 }
286287 / >
287288 < / Box >
288289 );
@@ -430,11 +431,11 @@ const styles = StyleSheet.create((theme) => ({
4304311. **Use descriptive names**: ` getCurrentUser ` not ` getUser `
4314322. **Group related operations**: Keep all auth operations in ` auth ` collection
4324333. **Type everything**: Never use ` any ` - define proper interfaces
433- 4 . ** Handle loading states** : Always show ` Loader ` component or loading indicators
434+ 4. **Handle loading states**: Always show loading indicators (see [Component Instructions](components.instructions.md))
4344355. **Handle errors gracefully**: Use ` useHandleQueryErrors ` and ` Alert ` for user feedback
4354366. **Cache efficiently**: Leverage React Query's built-in caching
4364377. **Use optimistic updates**: For mutations that should feel instant
437- 8 . ** Follow React Native patterns** : Use ` FlatList ` for lists, ` StyleSheet ` for styling
438+ 8. **Follow component patterns**: Use project UI components (see [Component Instructions](components.instructions.md))
4384399. **Use @ aliases**: Import from ` @/ ` for internal modules
43944010. **Zod imports**: Always use ` from ' zod/v4' ` instead of ` from ' zod' ` for schema validation
44044111. **Constants naming**: Use SCREAMING_SNAKE_CASE for constants (e.g., ` BASE_URL ` , ` REFRESH_TOKEN_URL ` )
0 commit comments