← React Native learning pathReact Native · Module 4 of 10
State, hooks and lists
Manage state and render long lists efficiently.
📖 Key ideas
- useState and useEffect work the same as in React.
- FlatList renders long lists lazily: data, renderItem, keyExtractor.
- SectionList groups items with headers.
- Pull to refresh with refreshing and onRefresh.
- Avoid ScrollView for very long lists.
💡 Real-life example: FlatList is a cinema reel: only the frames on screen are lit, not the whole film.
FlatListPerformant scrolling list
keyExtractorGives each item a unique key
SectionListList with sections
onRefreshPull-to-refresh handler