getNextUniqueId is not compatible with SSR
mkdynamic opened this issue · comments
Mark Dodwell commented
The global counter state used by getNextUniqueId
is not compatible with SSR because the client-side hydration produces a different value, and this value is rendered in at least one spot in the DOM tree (aria-describedby
, in the error below):
Warning: Prop `aria-describedby` did not match. Server: "DndDescribedBy-8" Client: "DndDescribedBy-1"
I think switching to useId
would solve this problem:
https://react.dev/reference/react/useId
Mark Dodwell commented
Oops, wrong repo. Meant for dnd-kit :)