react-id-generator
react-id-generator copied to clipboard
Transparently fall back to react's internal apis on react 18
React 18 got a new id api that essentially replaces this library however, to help with migration, it would be nice if this library would fall back to using react's internal one if it exists.
See here for an example:
https://github.com/tailwindlabs/headlessui/blob/b301f04c7747fcdebc9fcc380dee60c4393c7c2d/packages/%40headlessui-react/src/hooks/use-id.ts#L16-L29
Good idea @arlyon, let me come up with something. Feel free to submit a PR as well