PlainError

Warning: Each child in a list should have a unique "key" prop.

Last checked 2026-11-11 · 2 fixes · reviewed answer

TL;DRThis is a warning from the React JavaScript library. It appears when code renders a list of items (usually via .map()) but does not give each item a unique 'key' attribute that React needs to track updates efficiently.

Most likely cause: Missing key prop entirely on elements returned from an array map in JSX

Try first: Find the list in your code

Likely causes

  1. Missing key prop entirely on elements returned from an array map in JSXmost likely
  2. Using duplicate or non-unique values (such as array index) for keys in a changing listpossible

How to fix it

Safest first: SafeChanges settingsDangerous
  1. Find the list in your codeSafe

    Search your React component files for .map() calls that return JSX tags such as <li>, <div>, or custom components.

  2. Add a unique key propChanges settings

    On the top-level element inside the map, add key={item.id} (or another stable unique value from your data).

If that didn't fix it

Check the browser console stack trace to identify the exact file and line number producing the warning.

When to see a technician

If you cannot locate the list rendering code after reviewing the stack trace, ask the developer responsible for the React application for help.

Quick answers

What does Warning: Each child in a list should have a unique "key" prop. mean?
This is a warning from the React JavaScript library. It appears when code renders a list of items (usually via .map()) but does not give each item a unique 'key' attribute that React needs to track updates efficiently.
What causes Warning: Each child in a list should have a unique "key" prop.?
Missing key prop entirely on elements returned from an array map in JSX. (most likely) Using duplicate or non-unique values (such as array index) for keys in a changing list. (possible)
How do I fix Warning: Each child in a list should have a unique "key" prop.?
Try these in order, safest first: 1. Find the list in your code. 2. Add a unique key prop.
What if that didn't fix it?
Check the browser console stack trace to identify the exact file and line number producing the warning.
When should I see a technician?
If you cannot locate the list rendering code after reviewing the stack trace, ask the developer responsible for the React application for help.
Did this fix it? Report a problem

Related errors

All Coding errors →