Guard icon indicating copy to clipboard operation
Guard copied to clipboard

Issue: react-ui-components cannot work with react17

Open peggyxia-alj opened this issue 1 year ago • 1 comments

  • Version: react 17, next 12 and the react-ui-components is the latest version

  • Platform: MAC

Severity:

Critical

Description:

run the nextjs-react example, it cannot work with reach17(default setup in the exaple)

Steps to reproduce the error:

folk the github code, in the folder Guard/examples/nextjs-react, run npm run dev, it will show this error

Unhandled Runtime Error Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:

  1. You might have mismatching versions of React and the renderer (such as React DOM)
  2. You might be breaking the Rules of Hooks
  3. You might have more than one copy of React in the same app See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.

Call Stack resolveDispatcher node_modules/@authing/react-ui-components/node_modules/react/cjs/react.development.js (1465:0) useEffect node_modules/@authing/react-ui-components/node_modules/react/cjs/react.development.js (1508:0) fW node_modules/@authing/react-ui-components/lib/index.min.js (2:2209173)

peggyxia-alj avatar Sep 29 '24 22:09 peggyxia-alj

能否考虑将react-ui-components升级到react 17?

peggyxia-alj avatar Sep 29 '24 22:09 peggyxia-alj