In addition to minor lift-ups, this PR mainly focuses on a problem introduced at #26.
At #26 we follow @naugtur's envelop idea from #23 where we export a util function to help developers pass a unique object reference (aka token) to map to the secret instead of the secret itself, so that we don't leak the actual secret text to React internals at any point (because those leak it to the global object which compromises LavaDome completely)
Problem with this approach is that since the token is a new object, an identical secret text maps out to two different tokens, thus forcing React to rerender over and over even though the secret text is the same
This PR replaces the mechanizm of object-based tokens with string based tokens, by leveraging builtin crypto.randomUUID API, so that it's easier and more efficient to map secrets to token, especially when the secrets might already be familiar to the internals of LavaDomeReact
In addition to minor lift-ups, this PR mainly focuses on a problem introduced at #26.
crypto.randomUUID
API, so that it's easier and more efficient to map secrets to token, especially when the secrets might already be familiar to the internals of LavaDomeReact