server-reason-react
server-reason-react copied to clipboard
useId will have hydration issues
Implemented as an auto-incremental id starting at 0, but React implements this differently.
useId from their documentation: https://react.dev/reference/react/useId
There's some logic on tagging those ids as rendered from the server and also knowing how many ids are called in a tree/componnent locally.
Taken from https://jser.dev/2023-04-25-how-does-useid-work
Tests for useId https://github.com/facebook/react/blob/246d7bfeb0c90ecccd9531929b60a79d628a4c78/packages/react-dom/src/tests/ReactDOMUseId-test.js#L571