TypeError: n.useId is not a function
Describe the bug Page crashes with the error: "TypeError: n.useId is not a function"
To Reproduce
- install boring-avatars via npm
- use basic example from readme in a react component
Expected behavior No error.
Screenshots
Desktop:
- OS: Windows 11
- Browser: Chrome (v 120)
- React 17.0.2
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Having the same issue here. Took me days to figure out why my app was breaking 😆 Thanks for flagging this! Will use a different plugin 💨
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Hey, the useId() hook is only available in React 18 or above versions.
If you can't upgrade your project to the latest React version, I'd recommend using the v1.7.0 boring-avatars version: https://www.npmjs.com/package/boring-avatars/v/1.7.0
Hope that works