Generating a random identifier grew my bundle size by 300kb
blog.prat.ch
blog.prat.ch
https://en.wikipedia.org/wiki/Birthday_problem
There is something to say for generating a (React) key from the underlying data, possibly applying a hash function, for instance
sha384("geography:earth:jp:jp-17")
In the semantic web we call it Skolemization
https://en.wikipedia.org/wiki/Skolem_normal_form
but it's actually pretty simple.
As for the 300kb one might think at first that that's not very much, but it is so easy to have 30 things that are like that and it all adds up to a funky situation.