New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useId hook #3373
Comments
Chara-ui now uses only React 18 and uses useId hook; To update projects that use chakra-ui and preact that hook is required; |
Same with Reach UI. Running into errors when trying to switch to using preact/compat. |
I have a working version in #3583 just need to update some of the server-side libraries to add support for the |
An issue that seems very apparent now coming to think about it is that a large amount of users use React on the server and Preact on the client 😅 |
@JoviDeCroock will you cut a new release soon with these changes? |
@mjgerace #3583 (comment) sorry but this is really getting on my nerves - we as a team have been busy with releasing signals which was a big task 😅 I am trying my very best to get to everyone but.... it's not as easy as it might look |
@JoviDeCroock my apologies! I was just wondering about timeline - as you know, this will enable many folks to use React 18 component libraries safely. Please take the comment more as eagerness to be able to use new features rather than an attempt to annoy or beg. Take your time :) |
Usually for accessibility reasons we need to generate IDs for DOM elements and reference those IDs via e.g.
aria-labelledby
attributes on other DOM elements.Implementing a custom deterministic ID generator is not straightforward:
React 18 introduces a useId hook which solves the problem of mismatching IDs on SSR/hydration, as the generated IDs are deterministic and based on the node location in the tree which will match on SSR and on hydration (if I get it right).
I think this would be really useful for most of the Preact users as well. What do you think?
The text was updated successfully, but these errors were encountered: