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
vince2y 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
Tenkes2y 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 User2y ago
Message Not Public
Sign In & Join Server To View
vince
vince2y ago
Using index for keys is generally not recommended
vince
vince2y ago
Lists and Keys – React
A JavaScript library for building user interfaces
vince
vince2y ago
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
vince
vince2y ago
Cool!
Want results from more Discord servers?
Add your server