General
What is FlashList?
What is FlashList?
- No more blank cells during scrolling
- Better memory efficiency through view recycling
- Faster initial render
- Support for complex layouts (masonry, grids, sticky headers)
- FlashList v2 is JS-only and doesn’t require size estimates
How is FlashList different from FlatList?
How is FlashList different from FlatList?
- View Recycling: Instead of creating and destroying views, FlashList recycles them by updating their content
- No Estimates Required (v2): FlashList v2 automatically handles item sizing without estimates
- Better Performance: Maintains 60 FPS even with complex items
- Lower Memory Usage: Recycling views reduces memory overhead
Should I use FlashList v1 or v2?
Should I use FlashList v1 or v2?
- You’re on React Native’s new architecture (required for v2)
- You want the best performance and don’t want to manage size estimates
- You’re starting a new project
- You’re on the old architecture
- You need time to migrate to the new architecture
Can I use FlashList with Expo?
Can I use FlashList with Expo?
Is FlashList production-ready?
Is FlashList production-ready?
Migration
How do I migrate from FlatList to FlashList?
How do I migrate from FlatList to FlashList?
- Change the import:
- Update the component name:
- Remove any
keyprops from your item components - Add
keyExtractorif not already defined (recommended for v2) - Use
getItemTypefor heterogeneous lists - Test in release mode
What props are different from FlatList?
What props are different from FlatList?
getItemLayoutinitialNumToRendermaxToRenderPerBatchwindowSizecolumnWrapperStyle
getItemType- Improves performance for mixed item typesdrawDistance- Advanced rendering controlmaxItemsInRecyclePool- Control recycling behavior
My FlatList works fine. Why should I migrate?
My FlatList works fine. Why should I migrate?
- Better user experience: Eliminates blank cells during fast scrolling
- Lower memory usage: Recycling reduces memory pressure
- More features: Masonry layouts, better sticky headers, layout animations
- Future-proof: Built for React Native’s new architecture
- Same API: Easy migration with minimal code changes
Performance
Why does FlashList appear slow in dev mode?
Why does FlashList appear slow in dev mode?
- Additional logging and checks
- Non-optimized JavaScript execution
- React DevTools overhead
How do I optimize FlashList performance?
How do I optimize FlashList performance?
- Remove
keyprops from item components and nested components - Use
getItemTypefor lists with different item types - Memoize callbacks passed to FlashList (especially in v2)
- Keep items simple - complex components slow down recycling
- Use
useMappingHelperwhen mapping arrays inside items - Avoid heavy calculations in render - use
useMemo - Memoize child components that don’t depend on item data
Why am I seeing blank areas during scrolling?
Why am I seeing blank areas during scrolling?
- Using
keyprop in items (prevents recycling) - Heavy computations in render
- Not using
getItemTypefor heterogeneous lists - Complex component hierarchies
- Slow image loading
- Remove
keyprops from item components - Add
getItemTypefor different item types - Memoize child components with
memo() - Use image placeholders
What is getItemType and when should I use it?
What is getItemType and when should I use it?
getItemType tells FlashList about different types of items in your list. FlashList maintains separate recycling pools for each type, preventing expensive re-renders when recycling items.Use it when:- Your list has different types of items (e.g., posts, ads, headers)
- Items have significantly different layouts or heights
- You notice performance issues with mixed content
How many items can FlashList handle?
How many items can FlashList handle?
- Item complexity
- Device performance
- Memory available
Recycling
What is view recycling?
What is view recycling?
- When an item scrolls off screen, its component is kept in a recycle pool
- When a new item needs to be shown, a component from the pool is reused
- The component is re-rendered with the new item’s data
Why is my item showing wrong data after scrolling?
Why is my item showing wrong data after scrolling?
useRecyclingState hook:Can I disable recycling?
Can I disable recycling?
useRecyclingState or properly handling state in your components.Why can't I use key prop in my items?
Why can't I use key prop in my items?
key prop in items prevents recycling because React treats components with different keys as completely different components.keyExtractor. For mapping inside items, use useMappingHelper:Features
Does FlashList support horizontal lists?
Does FlashList support horizontal lists?
horizontal={true}:horizontal prop cannot be toggled dynamically. Use a key to force recreation if needed.Can I use sticky headers?
Can I use sticky headers?
Does FlashList support grid/masonry layouts?
Does FlashList support grid/masonry layouts?
Can I use FlashList for a chat interface?
Can I use FlashList for a chat interface?
maintainVisibleContentPosition for chat-style interfaces:Does FlashList work with animations?
Does FlashList work with animations?
- Layout animations (insert/delete)
- Reanimated integration
- Custom animated components
prepareForLayoutAnimationRender() before animating:Can I nest FlashLists?
Can I nest FlashLists?
- Horizontal inside vertical - Use FlashList for the vertical list too for best performance
- Never nest in ScrollView - This breaks virtualization
- Use proper keys - Define
keyExtractoron both lists
Testing
How do I test FlashList with Jest?
How do I test FlashList with Jest?
jest-setup.js:jest.config.js references it:How do I measure FlashList performance?
How do I measure FlashList performance?
Troubleshooting
Getting 'FlashList v2 is only supported on new architecture' error?
Getting 'FlashList v2 is only supported on new architecture' error?
- Enable new architecture in your app (recommended)
- Use FlashList v1 which supports old architecture
Getting 'Horizontal prop cannot be toggled' error?
Getting 'Horizontal prop cannot be toggled' error?
horizontal prop. Use a key to force recreation:Items not updating when data changes?
Items not updating when data changes?
extraData to tell FlashList about external dependencies:Where can I get help?
Where can I get help?
- Check the Troubleshooting guide
- Search GitHub issues
- Ask on Discord community
- Create a new issue with reproduction