Recall & Review
beginner
What is the main purpose of FlatList in React Native?
FlatList is designed to efficiently render large lists by only rendering items that are currently visible on the screen, improving performance and memory usage.
Click to reveal answer
beginner
How does FlatList improve performance when handling large datasets?
FlatList uses lazy loading and virtualization, rendering only a small subset of items visible on the screen instead of all items at once.
Click to reveal answer
intermediate
What is virtualization in the context of FlatList?
Virtualization means FlatList creates and keeps in memory only the items currently visible plus a small buffer, reducing memory use and improving scroll performance.
Click to reveal answer
beginner
Why is rendering all items in a large list at once a problem on mobile devices?
Rendering all items uses a lot of memory and CPU, causing slow app performance, laggy scrolling, and possible crashes on devices with limited resources.
Click to reveal answer
intermediate
What role does the 'keyExtractor' prop play in FlatList's efficiency?
The 'keyExtractor' helps FlatList identify items uniquely, enabling efficient updates and re-renders only for changed items, which improves performance.
Click to reveal answer
What technique does FlatList use to handle large datasets efficiently?
✗ Incorrect
FlatList uses virtualization and lazy loading to render only visible items, improving performance.
Why is rendering all list items at once bad for mobile apps?
✗ Incorrect
Rendering all items consumes memory and CPU, causing lag and poor user experience.
What does the 'keyExtractor' prop do in FlatList?
✗ Incorrect
'keyExtractor' provides unique keys to help FlatList update only changed items.
FlatList renders items that are:
✗ Incorrect
FlatList renders visible items plus a buffer to optimize performance.
Which of these is NOT a benefit of FlatList's virtualization?
✗ Incorrect
FlatList does NOT render all items simultaneously; that would hurt performance.
Explain how FlatList manages to display large lists without slowing down the app.
Think about how it avoids showing everything at once.
You got /4 concepts.
Describe the importance of the 'keyExtractor' prop in FlatList's efficient rendering.
How does FlatList know which items changed?
You got /3 concepts.