Quick Start
That’s it! In most cases, FlashList is a drop-in replacement for FlatList.Basic Example
Important Differences
While FlashList is largely compatible with FlatList, there are some important differences to be aware of:Required: estimatedItemSize (v1 only)
If you’re using FlashList v2, you can skip this section. Size estimates are not required in v2.
estimatedItemSize for optimal performance:
Remove Explicit key Props
Before - FlatList
After - FlashList
keyExtractor:
Using .map() Inside Items
If you’re using.map() inside your rendered items, use the useMappingHelper hook:
useMappingHelper for .map() operations
useMappingHelper for .map() operations
Before - FlatList
After - FlashList
Prop Differences
Supported Props
FlashList supports most FlatList props including:Core Props
datarenderItemkeyExtractorextraData
Layout Props
horizontalnumColumnscontentContainerStyleListHeaderComponent
Callbacks
onEndReachedonEndReachedThresholdonViewableItemsChangedonRefresh
Components
ListFooterComponentListEmptyComponentItemSeparatorComponent
Unsupported FlatList Props
Props that don't work with FlashList
Props that don't work with FlashList
Performance-related props (not needed due to FlashList’s architecture):
getItemLayout- FlashList automatically calculates layoutsinitialNumToRender- FlashList manages rendering differentlymaxToRenderPerBatch- Not applicable to FlashList’s rendering modelwindowSize- FlashList uses a different windowing strategyupdateCellsBatchingPeriod- Not needed in FlashListdisableVirtualization- Goes against FlashList’s core design
columnWrapperStyle- Not currently implementeddebug- Use FlashList’s built-in performance tracking insteadlistKey- Not required in FlashListonScrollToIndexFailed- Not currently implementedsetNativeProps- Not available in FlashList
Additional Features in FlashList
FlashList includes several features not available in FlatList:New Props
drawDistance
drawDistance
Draw distance for advanced rendering control:
getItemType
getItemType
Improve recycling performance for heterogeneous lists:
overrideItemLayout
overrideItemLayout
Customize item spans for grid layouts:
onLoad
onLoad
Called once when the list has drawn items:
New Methods
Additional ref methods
Additional ref methods
FlashList provides extra methods through its ref:
Migration Steps
Follow these steps when migrating from FlatList to FlashList:Remove explicit key props
Scan your
renderItem hierarchy for explicit key prop definitions and remove them. Use keyExtractor instead.Add useMappingHelper for .map()
If you use
.map() inside rendered items, implement the useMappingHelper hook.Check useState usage
Review components in your
renderItem hierarchy that use useState. Due to FlashList’s recycling, you may need to use useRecyclingState instead.Understanding recycling
Understanding recycling
FlashList recycles view components as you scroll. If a component maintains local state with
useState, that state might not reset when the component is recycled for a different item.Before - Potential issue
After - Fixed with useRecyclingState
Use getItemType for heterogeneous lists
If your list has different types of items (headers, images, text, etc.), pass their types using
getItemType to improve performance.Common Patterns
Pull to Refresh
Infinite Scroll
Grid Layout
Horizontal List
Performance Comparison
FlashList significantly outperforms FlatList, especially for:
- Long lists (100+ items)
- Lists with complex items
- Frequent data updates
- Heterogeneous content
- 5-10x faster initial render
- Significantly reduced blank cells during fast scrolling
- Lower memory usage
- Smoother animations and interactions
Troubleshooting
Blank cells appearing during scroll
Blank cells appearing during scroll
Possible causes:
- Testing in dev mode (test in release mode)
- Items have varying heights but no
getItemTypespecified - Heavy computation in
renderItem(memoize components) - Low
drawDistancevalue (increase if needed)
Items not updating correctly
Items not updating correctly
Possible causes:
- Missing
keyExtractor - State not resetting due to recycling
- Props not memoized properly
Layout issues or overlapping items
Layout issues or overlapping items
Possible causes:
- Inconsistent item heights without proper
getItemType - Custom
CellRendererComponentinterfering with layout - Padding/margin issues in
contentContainerStyle
Next Steps
Usage Guide
Learn about all FlashList props and methods
Performant Components
Optimize your list items for maximum performance
Recycling
Understand how FlashList recycles components
What's New in v2
Explore FlashList v2 features (if using new architecture)