Open Andarist opened 6 years ago
The best solution would be to use a Symbol
, but I'm not sure about the best way to support browsers that don't have it, like IE 11.
Me neither 😉This could be used in development
mode only though, npm link
rather shouldnt be used in production environments.
Each npm linked package has its own set of node_modules, therefore there might be multiple copies of
react-broadcast
s required by an app (all with the same version). Each of them ofc maintains its ownuid
counter butbroadcasts
is a shared key on legacy context and all those copies override what the put in context.Don't have better idea on how to deal with it than randomizing
broadcasts
key (at least in development), thoughts? Can prepare a PR handling this if you find it worthwhile.