Fix janky React Native lists: FlatList settings, stable keys, memoised rows, image handling and when to reach for FlashList, with code you can adapt.
In this article
The quickest way to make a slow React Native list faster is to render less and re-render less. Use a virtualised list such as FlatList, give every row a stable key, keep row components cheap and memoised, avoid creating new functions and objects inside the render path, size images properly and tune the windowing props. If rows are complex or the list is very long, consider FlashList, which recycles views. Always measure on a real mid-range phone in a release build, because the emulator and development mode will mislead you. This guide walks through the changes in order of impact.
Why lists get slow
A list screen asks the JavaScript thread to describe many rows and asks the native side to lay them out, draw them and keep scrolling smooth at the display refresh rate. Jank appears when either side cannot keep up. The common causes are:
- Rendering far more rows than the user can see.
- Re-rendering every visible row when only one item changed.
- Heavy work inside the row, such as formatting dates, parsing data or building large style objects on every render.
- Large images decoded at full size.
- Blocking the JavaScript thread with network handlers, animations or state updates during a scroll.
Fixing the first two usually gives the biggest gain. For a broader view of app quality before launch, see our mobile app testing strategy guide.
Use a virtualised list and the right data shape
Never map a long array into a ScrollView. A virtualised list renders only the rows near the viewport and removes the rest.
<FlatList
data={items}
keyExtractor={(item) => item.id}
renderItem={renderItem}
getItemLayout={getItemLayout}
/>
Practical points:
- Stable keys. Use a unique, stable id from your data for
keyExtractor. Using the array index causes wrong rows to be reused when data is inserted or reordered, producing flicker and bugs. - Pass only what a row needs. Flatten or select fields before the list so rows do not receive large nested objects.
- Do not nest vertical lists inside a ScrollView of the same direction. It defeats virtualisation and triggers warnings. Use list header and footer components or a SectionList instead.
- Paginate. Load a page at a time and use
onEndReachedwith a threshold, rather than fetching thousands of records up front. Your API integration should support paging with cursors or limits.
Make rows cheap and memoised
When state changes, React re-renders components whose props changed. If your renderItem is an inline function and your row is not memoised, every visible row can re-render on every update.
const Row = React.memo(function Row({ item, onPress }) {
return (
<Pressable onPress={() => onPress(item.id)}>
<Text>{item.title}</Text>
</Pressable>
);
});
const renderItem = useCallback(
({ item }) => <Row item={item} onPress={handlePress} />,
[handlePress]
);
Guidelines for rows:
- Wrap the row in
React.memoand keep its props primitive or stable references. - Define
renderItem,keyExtractorand handlers outside the render path or withuseCallback. - Pre-compute display values, such as formatted dates and labels, when data arrives, not inside every render.
- Keep the view tree shallow. Deeply nested containers cost layout time on every row.
- Hoist static styles into
StyleSheet.createrather than building style objects inline. - Pass a single selected id or a boolean to each row rather than the whole selection array, so toggling one row does not re-render all of them.
Be wary of the extra-data prop. FlatList is a pure component, so if you change something outside data that affects rendering, you need extraData, but changing it re-renders rows, so use it sparingly.
Tune windowing and layout
FlatList exposes props that trade memory and blank areas against work done.
| Prop | What it does | Typical use |
|---|---|---|
getItemLayout | Tells the list each row's height and offset so it can skip measuring | Fixed-height rows, jump-to-index |
initialNumToRender | Rows rendered on first paint | Enough to fill the first screen, no more |
windowSize | How many screens of content are kept rendered | Lower saves memory, higher reduces blank areas when scrolling fast |
maxToRenderPerBatch | Rows added per render batch | Lower keeps the thread responsive |
removeClippedSubviews | Detaches off-screen views | Can help on Android, can cause glitches, so test |
There is no universal best setting. Change one prop at a time, test scrolling fast on a modest device, and keep the change only if it helps. Fixed-height rows and getItemLayout are the most reliable win when your design allows them.
Handle images and media carefully
Images are a frequent hidden cost in feeds and catalogues.
- Request thumbnails at the size you display, not the original upload. Resizing on the server or through an image service saves both bandwidth and decoding time.
- Give images explicit width and height so layout does not jump as they load.
- Use an image library with caching and prioritised loading rather than relying only on the default component, and check its current documentation for the options you need.
- Prefer modern formats where your platforms support them, and avoid animated images in long lists.
- Show lightweight placeholders while loading.
The same ideas apply on the web; our article on image optimisation for fast websites covers formats and sizing in more depth.
Consider FlashList and other options
FlashList is an alternative list component that recycles row views instead of mounting and unmounting them as you scroll. This tends to help with long lists and rows that are expensive to create. It has its own requirements, such as an estimated item size and care with keys and state held inside rows, so read its current documentation and test your own screens. Switching is often a small code change, but you should benchmark on a real device rather than assume it is faster for your case.
If your list is really a grid, a chat or a timeline with variable heights, check whether the library supports inverted lists and dynamic sizes well before committing.
Measure before and after
Guessing wastes time, because the slowest part of a list is often not the part developers suspect. A single expensive image or a state update fired on every scroll event can outweigh all your careful memoisation.
- Test in a release build on a mid-range Android device and an older iPhone. Development mode is slower and not representative.
- Use the React DevTools profiler to see which rows re-render and why.
- Use the performance monitor overlay or platform profilers, such as Android Studio's profiler and Xcode Instruments, to watch frame rates and memory.
- Write down a baseline, such as how smooth a fast scroll through 500 rows feels and how long the first paint takes, then repeat after each change.
- Add a performance check to your release routine so regressions are caught early.
Performance is part of the experience. Slow lists make users give up, a theme we explore in mobile app UX patterns that reduce drop-off.
What to do next
- Confirm your long lists use FlatList or FlashList, not ScrollView.
- Check keys, memoise rows and stabilise callbacks.
- Move heavy formatting out of render and shrink images.
- Tune one windowing prop at a time and measure on a real device.
- Profile again and keep a baseline for future releases.
If your team would like a second pair of eyes on a slow screen, or you are weighing frameworks, the CloudWiss team in Dublin can talk it through. You can read more about our mobile app development service, and our comparison of React Native and Flutter may help if you are still choosing.
Share this article
General educational information, not legal or professional advice for your specific situation.
