Open stevelw opened 2 weeks ago
Keys should be consistent between renders, so random numbers should not be used.
Use a reproducible UUID instead. It's suggested to use https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID
https://github.com/stevelw/fe-nc-news/blob/58f549caa793b0d43b7ca1e8bc68fc2a6a77a4af/src/components/CommentList.jsx#L58
Use Symbol - JavaScript | MDN to generate keys for React elements?
Keys should be consistent between renders, so random numbers should not be used.
Use a reproducible UUID instead. It's suggested to use https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID
https://github.com/stevelw/fe-nc-news/blob/58f549caa793b0d43b7ca1e8bc68fc2a6a77a4af/src/components/CommentList.jsx#L58