CodeZettaInterview Hub

React · Reconciliation · Senior · Concept

Why do keys matter for list reconciliation?

Short Interview Answer

Keys identify item identity across renders so React can move/reuse nodes and state.

Detailed Explanation

Index keys break on insert/reorder. Unstable keys remount and lose focus/state.

Did you know this answer?