Warning: Each child in a list should have a unique "key" prop
When rendering a list with .map(), each element needs a stable, unique key so React can track items between renders.
Seen on:
React
Meaning
Without keys (or with duplicate/unstable keys like array indexes on reorderable lists), React may reuse the wrong DOM nodes — causing inputs to keep wrong values or animations to glitch.
Common causes
- Missing
keyon the outermost element returned from map - Duplicate IDs in data
- Key placed on an inner element instead of the returned one
- Using index as key on lists that reorder/filter
⚡ Quick fix
- Add
key={item.id}to the element returned by map - Use stable IDs from your data, not Math.random()
- Put the key on the
<Fragment key=…>when returning fragments
Detailed fix by platform
React
- Example:jsx
{users.map(u => <UserRow key={u.id} user={u} />)}
How to diagnose
- Component — Which component renders the list (named in the warning)?
- Keys — Unique and stable?
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026