Shopify FlashList: Fixing React Native's Blank Cells
FlashList is a performant drop-in replacement for React Native's FlatList. It recycles components to eliminate blank cells during fast scrolling in long lists. The footgun is assuming it fixes all performance issues, not just rendering.
Why it exists
React Native's built-in FlatList component struggles with long, dynamic lists. During a fast scroll, it can't create and render new list items fast enough, resulting in noticeable stutter and empty white spaces—the infamous "blank cells." This degrades the user experience, making the app feel slow and unresponsive.
The mental model
Think of FlashList as a component recycler, not just a list renderer. A standard FlatList is like using disposable plates; you use one, throw it away, and grab a new one, which is slow. FlashList is like having a stack of clean plates; when one is used, it's washed (recycled) and put back in the stack, ready to be refilled with new data instantly. This avoids the costly process of creating new components from scratch for every item.
How it works
FlashList maintains a pool of rendered components. When an item scrolls out of view, its component isn't destroyed. Instead, it's returned to the pool. When a new item needs to be displayed, FlashList grabs a compatible component from the pool, updates its props with the new data, and places it on screen. This re-use of existing component instances is significantly faster than the constant creation and destruction cycle of FlatList, resulting in smoother scrolling.
When to use it
Use FlashList to replace FlatList in any screen with long or infinite-scrolling lists where performance is critical. It's a quick win for social media feeds, large product catalogs, chat histories, and any list that shows blank cells or stutters during fast scrolling. The API is nearly identical to FlatList, making it a low-effort, high-impact upgrade.
When not to use it
For very short, static lists (fewer than 20 items), the overhead of FlashList's recycling mechanism is unnecessary; a simple ScrollView or the standard FlatList will suffice. Also, be mindful of compatibility; the library has different versions for React Native's old and new architectures.
One canonical example
Replacing FlatList is straightforward. You swap the import and add the estimatedItemSize prop, which helps FlashList with its layout calculations. All other props like data and renderItem typically work the same.
Before:
import { FlatList } from 'react-native';<FlatList data={myData} renderItem={renderItem} />
After:
import { FlashList } from '@shopify/flash-list';<FlashList data={myData} renderItem={renderItem} estimatedItemSize={200} />
Interview question
What is the core mechanism FlashList uses to achieve smoother scrolling and eliminate blank cells?
- a.It renders items in batches on a background thread to prevent UI stutter.
- b.It fetches data for items far outside the viewport to ensure they are ready when scrolled into view.
- c.It reuses existing component instances by updating their data, rather than creating new ones.Correct
- d.It pre-calculates the exact height of all items to optimize layout rendering.
Why? this is the answer
FlashList's primary innovation is component recycling: it maintains a pool of rendered components and reuses them by updating their props with new data, which is faster than creating new components. Option D describes a layout optimization, not the component recycling mechanism.
Just read this? Test yourself on what you have been reading.
Read the original → shopify.github.io
- #react native
- #performance
- #shopify
- #flatlist
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on react native — each one lists the topics its interview covers.
See open roles