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
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 useuseId()
.Additional Notes
id
prop(s) should be able to override theuseId()
usageid
s are not supported by CSS selectors or APIs likedocument.querySelectorAll