Inside the render window, FlatList does not mount rows all at once. It renders a first batch when the list mounts, then adds rows in batches as the user scrolls, and every batch is JavaScript work that can hold up other events, presses included. Four props control that rendering. Two of them, maxToRenderPerBatch and updateCellsBatchingPeriod, trade fill rate against responsiveness.
Key terms
- initialNumToRender: how many items the list renders in its initial batch.
- maxToRenderPerBatch: the maximum number of items rendered in each incremental batch while scrolling.
- updateCellsBatchingPeriod: the time in milliseconds between low-priority render batches.
- removeClippedSubviews: when
true, views outside the viewport are detached from the native view hierarchy. - Responsiveness: how quickly the app reacts to an interaction, such as a touched row that should respond right away.
The first screen comes from initialNumToRender
initialNumToRender defaults to 10. Until the list has measured its scroll view, it does not compute a window at all: it trusts this number and renders that many rows. The value should be enough to fill the screen and not much more.
Too low, and the first frames can show blank space below the last rendered row, especially when the batch is too small to cover the viewport. Picking a number that covers the screen on every device you support can be a big boost for the initial render, so size it for the tallest screen and the shortest row.
These first items are never unmounted by windowed rendering, which keeps scroll-to-top fast. A large value therefore keeps more rows mounted for the life of the list, on top of the extra rows in the first batch.
Batch size while scrolling
maxToRenderPerBatch is a VirtualizedList prop you pass through FlatList. It caps the number of items in each batch, the next chunk the list renders as the user scrolls, and defaults to 10. Capping each batch lets visible content fill quickly instead of waiting for the whole overscan window to render.
A bigger number means fewer blank areas while scrolling, because it raises the fill rate. More items per batch also means longer stretches of JavaScript execution that can block other events, presses included. If a row tap feels late while the list is still filling, a smaller batch is the lever to try, and if blank space shows up during steady scrolling, a larger one.
Batch timing with updateCellsBatchingPeriod
updateCellsBatchingPeriod is the time between low-priority batches, the ones that render items a long way off screen. The list schedules them with a timer that defaults to 50 ms. Combined with maxToRenderPerBatch, it lets you render more items in less frequent batches, or fewer items in more frequent ones. Less frequent batches can leave blank areas, and more frequent ones can cost responsiveness.
The period does not throttle every batch. When the user scrolls quickly toward the edge of the rendered content, the list switches to a high-priority update: it cancels the pending timer and renders cells immediately to fill content as fast as it can. Raising the period therefore slows the rows far ahead of the user, and leaves the rows about to scroll into view on the fast path.
removeClippedSubviews and the main thread
With removeClippedSubviews set to true, views outside the viewport are detached from the native view hierarchy and drop out of native rendering and drawing traversals. That cuts time spent on the main thread and lowers the risk of dropped frames. FlatList turns it on by default on Android and leaves it off on iOS.
The detached views are not deallocated, so it does not save significant memory. Memory stays a windowSize decision. The implementation can also have bugs such as missing content, mainly seen on iOS and especially with complex transforms or absolute positioning. If you turn it on for iOS, test those screens on a device first.
A tuned transaction list
The TransactionList example targets a screen where rows open a detail view on press, and each prop answers a different complaint.
initialNumToRender={16} assumes the tallest supported screen shows about 16 rows, so the first frame is full. maxToRenderPerBatch={4} keeps each scroll batch short so a press between batches is handled sooner, at the cost of some fill rate. updateCellsBatchingPeriod={80} spaces out the far-off batches, which only affects low-priority work. removeClippedSubviews keeps its platform default.
Code Examples
import {FlatList, Pressable, Text} from 'react-native';
type Transaction = {id: string; merchant: string; amount: string};
type Props = {
transactions: Transaction[];
onOpen: (id: string) => void;
};
export function TransactionList({transactions, onOpen}: Props) {
return (
<FlatList
data={transactions}
keyExtractor={item => item.id}
renderItem={({item}) => (
<Pressable onPress={() => onOpen(item.id)}>
<Text>{item.merchant}</Text>
<Text>{item.amount}</Text>
</Pressable>
)}
// Enough rows to cover the tallest screen the app supports
initialNumToRender={16}
// Shorter batches leave the JS thread free for presses more often
maxToRenderPerBatch={4}
// Spaces out low-priority batches (default 50 ms)
updateCellsBatchingPeriod={80}
/>
);
}