A list of 20 items will be fast however you build it. A feed of 2,000 products with images is where jank shows up, especially on mid-range Android phones.
Never map a long array into a ScrollView
ScrollView renders every child at once. Use FlatList (or FlashList from Shopify for very long or complex lists), which only renders what's near the screen.
Give the list what it needs
<FlatList
data={products}
keyExtractor={(item) => item.id}
renderItem={renderProduct}
getItemLayout={(_, index) => ({ length: ROW_HEIGHT, offset: ROW_HEIGHT * index, index })}
initialNumToRender={8}
windowSize={7}
/>
- A stable
keyExtractorlets React reuse rows instead of rebuilding them. getItemLayoutskips measuring rows when they all have the same height.- A smaller
windowSizekeeps fewer off-screen rows in memory.
Keep rows cheap
- Wrap the row component in
React.memoand definerenderItemoutside the render, or withuseCallback, so rows don't re-render when unrelated state changes. - Don't do formatting or filtering inside the row. Prepare the data once, before it reaches the list.
Images are usually the real cost
Request thumbnails at the size they're displayed, not full-size uploads. A caching image component such as expo-image avoids downloading the same picture again as rows scroll back into view.
Measure on a slow phone
Test release builds on a low-end Android device, not a simulator on a fast laptop. Development builds are much slower and will send you chasing problems that don't exist.

Comments (0)
No comments yet. Start the conversation.
Join the conversation
Sign in or create a free account to comment.