Issue after upgrading healdessui to latest version in a react17 project: Uncaught TypeError: (0 , import_react45.useId
crissadriana opened this issue · comments
What package within Headless UI are you using?
@headlessui/react v2.0.3
What version of that package are you using?
v2.0.3
What browser are you using?
Chrome / Safari / FF
Reproduction URL
N/A
Describe your issue
We've got a project using react 17 currently and we've just upgraded to the v2.0.3 of react headlessui, but we keep getting this error: Uncaught TypeError: (0 , import_react45.useId
Are there any requirements in order to upgrade to this version?
Hi! Headless UI v2 now requires React 18 as we're making use of some React 18+ features now. You can see this in our peer dependencies here:
headlessui/packages/@headlessui-react/package.json
Lines 44 to 47 in 031b39d
You should've seen warnings from NPM when you installed it into a React 17 project. So, if you want to use Headless UI v2 you will need to upgrade your project first.