← React Native learning path
React Native · Module 4 of 10

State, hooks and lists

Manage state and render long lists efficiently.

📖 Key ideas

  1. useState and useEffect work the same as in React.
  2. FlatList renders long lists lazily: data, renderItem, keyExtractor.
  3. SectionList groups items with headers.
  4. Pull to refresh with refreshing and onRefresh.
  5. 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