- function to generate unique keys/ids/numbers/strings and use that
- existing npm packages like uuid, uniqid, etc
- generate random number `key-${new Date().getTime()}` with prefix from item being iterated
- using the unique ID from the database
https://stackoverflow.com/questions/39549424/how-to-create-unique-keys-for-react-elements
No comments:
Post a Comment