react-id-generator icon indicating copy to clipboard operation
react-id-generator copied to clipboard

Transparently fall back to react's internal apis on react 18

Open arlyon opened this issue 3 years ago • 1 comments

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

arlyon avatar Aug 22 '22 20:08 arlyon

Good idea @arlyon, let me come up with something. Feel free to submit a PR as well

Tomekmularczyk avatar Dec 04 '22 13:12 Tomekmularczyk