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