Skip to main content
React Interview Questions Theory P0 Medium

Keys, reconciliation and component identity

How does React decide which state belongs to a list item? Why can index keys be wrong?

Official Reference

Model Answer & Explanation

React uses element type and position within the parent, with keys identifying children among their siblings. Stable item IDs preserve state with an item across reordering. Index keys can attach local state to the wrong item after insertion or sorting. Changing a key intentionally resets that subtree.

Follow-up Interview Question · Give a case where a changing key is the right way to reset a form.

Module Context & References

React · Rendering & hooks theory Explain renders, reconciliation, keys, state, effects and performance
Personal Notes · Markdown

Technologies & Interview Topics Covered

Switch between short-term interview tracks and long-term 80/20 engineering depth to practice JavaScript internals, React rendering and hooks, timed frontend machine coding UI challenges, MeetaPro FG300, Blind 75 & NeetCode 150 DSA patterns, Python & FastAPI APIs, PostgreSQL query optimization & MVCC, Redis caching, Applied AI RAG pipelines & evaluations, and distributed system design.