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} />
Read the original → shopify.github.io
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.