VibeDict

🧩List items have no key

What you'll see
Each child in a list should have a unique "key" prop

A warning that each item needs a name tag (key) when you draw a list. The screen won't break right away, but things can look wrong when the order changes.

🤔 Why does it happen?

  • A list was drawn with map() without adding a key
  • The same key value was used more than once

🔧 Try this

  1. Use each item's unique value (such as its id) as the key
  2. Only use the position number (index) as the key when the list never changes

🤖 Ask your AI like this

I get the warning 'Each child in a list should have a unique key prop' in React. Please find where lists are drawn and give each item a unique key.

Replace the [ ] parts with your own situation, and paste the error with a few extra lines before and after it.

Related terms

Other errors in this group