Lists: thousands of rows without jank · senior
FlashList v2, recycling and Legend List
FlashList keeps a pool of mounted cells and, when a row scrolls away, re-renders that same cell with a new item instead of unmounting it, which cuts blank areas and memory, but any local state inside a cell leaks into the next item unless you reset it.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- FlashList v2 (2.3.x) is New Architecture only and JS-only. It needs no size estimates: estimatedItemSize is "no longer used".
- Recycling: a cell leaving the screen gets a new item prop. useState inside the row keeps its old value. Use useRecyclingState(initial, deps, onReset) or derive state from the item.
- getItemType(item) keeps separate pools per row shape (post, ad, header), so a cell is reused only for the same shape.
- Do not put key props inside row content (it defeats recycling). Give expo-image a recyclingKey so an old image does not flash.
- v2 extras: maintainVisibleContentPosition on by default; onStartReached and startRenderingFromBottom for chat; masonry is a prop (MasonryFlashList is deprecated); maxItemsInRecyclePool.
- Put padding on contentContainerStyle, not style.
- Legend List: a pure-TypeScript list (no native code), a drop-in for FlatList/FlashList; recycling is opt-in (recycleItems).
The red pen
Common traps: mistake → fix
Mistake: "Pass estimatedItemSize for speed"
Fix: v2 ignores it.
Mistake: "A recycling bug means FlashList is broken"
Fix: state lives in the cell; reset it per item.
Mistake: "FlashList v2 works on the old architecture"
Fix: it needs the New Architecture.
Easy to hard
Questions interviewers ask, easy to hard
- What is FlashList and why might you choose it over FlatList?
- A row briefly shows the previous item's image or keeps its "liked" toggle. Why?
- How do you reset per-row state correctly?
- How do you render a feed with posts, ads and carousels efficiently?
- What changed in FlashList v2?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.