The problem with using shortid or any id generating library is that every render will cause each…
Michael Leung
1

Michael,

never would I recommend to use key={ shortid.generate() } , which is equivalent to Math.random() as you describe. I hope I explain in the article that key needs to be persistent and bound to the item.

If an item already has a unique property, it should of course be used in the first place.

Show your support

Clapping shows how much you appreciated Robin Pokorny’s story.