#Next.js 13.5 Upgrade: 'Key' Prop Warning Issue

14 messages · Page 1 of 1 (latest)

plain burrow
#

I upgraded Next.js to the latest version, 13.5. When I ran the CLI, it displayed a warning message: 'Warning: Each child in a list should have a unique "key" prop.' However, it didn't specify where this issue occurred, and I have many array.map iterations in my project. Could you provide a solution to resolve this?

By the way, I really appreciate the new clean CLI interface ❤️.thinq

high boneBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

nimble ether
#

The fixes are:

  • add the key prop
  • disable the eslint rule(will never recommend this)
plain burrow
nimble ether
plain burrow
nimble ether
#

in the console

plain burrow
#

it doesn't show in the browser console but cli. maybe this is server component

nimble ether
#

yeah then that is the reason

tidal idol
sharp spoke
#

Usually this would be an warning in console. But if you install eslint it would turned to be a build error. The only way to remove it check and provide where you missed any key prop ( might be in the map function) .This error pops up since you really missed any key props..just find it and provide it.