-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid hook call on react 17 #4
Comments
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:
|
Hi @antongitnow , That must be due to the fact that there are two versions of |
You can use yarn resolutions to fix this problem, if you're using npm, you can check npm-force-resolutions.
|
I believe removing react and react-dom from devs to dev devs should resolve the issue with the 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://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
I believe removing react and react-dom from devs to dev devs should resolve the issue with the 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://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
Hi ! I'm using this versions of react and react-dom and I'm still getting the same error
Thanks |
Should be fixed now 👀 |
Hi,
I'm getting following error in React 17.
What could be the issue? Maybe incompatibility. I am getting started with React and have no clue.
index.js
TechRadar.js
The text was updated successfully, but these errors were encountered: