Closed
Description
Describe the bug
When using server-side rendering, the uniqueId()
function causes hydration warnings because the idSeed
counter is globally shared for all renders for all users while it's reset to 10,000 on the client.
Additionally, this has the unintended side effect of leaking information about how many times a given page is visited (per rendering process, at least).
To Reproduce
Render any Primer component that uses uniqueId()
using server-side rendering.
Expected behavior
The same ID is used on the server as on the client.
Screenshots