All jobs / Mobile developer / Cross-Platform
Mobile developer interview question · 0–1 years
A React Native list reshuffles items and several rows show the wrong image. What do you look at first?
The strongest answer
The key / identity of each row — if I used the index, recycled views will keep the wrong child state
Why it works
Exactly. Identity is how reuse stays honest. Index keys are a classic RN (and React) miss.
What a good answer covers
- Stable keys, not indexes.
- Virtualized lists reuse views — identity matters.
- Do not “fix” it by mounting everything.
- Same rule as React on the web.
Answers that fall short
- Close, but not the strongest: I wrap every row in a 500 ms setTimeout so images “settle”
Timers hide a key bug; they do not fix it. - Weak: I switch to a ScrollView of Views so nothing virtualizes
Turning off virtualization is a memory bill, not a diagnosis. - Red flag: I disable Fast Refresh; this is a bundler bug
Fast Refresh is not why recycled rows keep the wrong photo.
Who gets asked this
More Cross-Platform questions
- How do you treat the Android system Back button versus iOS’s interactive pop?
- Flutter needs a platform API the plugin ecosystem does not cover. How do you reach it?
- A React Native app is still on the old bridge. When do you move to the New Architecture?
- A Flutter screen parses a large file and the UI freezes for about a second while it does. Why, and what do…
- A cross-platform codebase has is-iOS / is-Android checks scattered through the screens, and a fix for one…
- A Flutter upgrade enables Impeller everywhere. What do you do before the store push?
- A native app will host one React Native flow. What do you insist on?
- An RN screen is slow and the team wants to “rewrite in native.” What do you do first?