React keys

Should I just trust React that the keys I've set are unique if it doesn't complain? I can't see them anywhere in devtools, and was just a bit suspicious that it had quietly allowed a mistake of mine to slip through. Obviously I can add UUID or w/e, but was just interested in whether it's visible at all?
8 Replies
vince
vince14mo ago
Did you try the react devtools browser plugin? I'm not sure if it shows it there either but worth a try if you don't have it installed yet
Tenkes
Tenkes14mo ago
it does show them in react devtools extension. also you can get error in console saying multiple elements have identical keys if you use react strict mode
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
vince
vince14mo ago
Using index for keys is generally not recommended
vince
vince14mo ago
Lists and Keys – React
A JavaScript library for building user interfaces
vince
vince14mo ago
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
vince
vince14mo ago
Cool!