Skip to content
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

Remove required id prop from all components (requires React 18) #1387

Open
mlaursen opened this issue Mar 29, 2022 · 0 comments
Open

Remove required id prop from all components (requires React 18) #1387

mlaursen opened this issue Mar 29, 2022 · 0 comments
Milestone

Comments

@mlaursen
Copy link
Owner

mlaursen commented Mar 29, 2022

With the new release of React 18, it is now possible to generate unique IDs that are stable across server and client with the useId hook. This means I can remove the id requirement for all components and just use useId().

Additional Notes

  • the id prop(s) should be able to override the useId() usage
  • the new ids are not supported by CSS selectors or APIs like document.querySelectorAll
@mlaursen mlaursen changed the title Remove required id prop from all components Remove required id prop from all components (React 18 requirement) Mar 29, 2022
@mlaursen mlaursen changed the title Remove required id prop from all components (React 18 requirement) Remove required id prop from all components (requires React 18+) Mar 30, 2022
@mlaursen mlaursen changed the title Remove required id prop from all components (requires React 18+) Remove required id prop from all components (requires React 18) Apr 1, 2022
@mlaursen mlaursen added this to the v6.0.0 milestone Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant