In our storybooks we use seedrandom to seed Math.random because we use them for visual regression. That means that the randomly generated IDs can result in duplicate keys:
Randomly generated id: https://github.com/storybooks/storybook/blob/master/addons/actions/src/preview.js#L16
Use of the ID in a key: https://github.com/storybooks/storybook/blob/master/addons/actions/src/components/ActionLogger/index.js#L22
And we all know how React feels about duplicated keys... 😞
Could a uuid be used instead?
In our storybooks we use seedrandom to seed
Math.randombecause we use them for visual regression. That means that the randomly generated IDs can result in duplicate keys:Randomly generated id: https://github.com/storybooks/storybook/blob/master/addons/actions/src/preview.js#L16
Use of the ID in a key: https://github.com/storybooks/storybook/blob/master/addons/actions/src/components/ActionLogger/index.js#L22
And we all know how React feels about duplicated keys... 😞
Could a uuid be used instead?