React hooks error with material-ui
See original GitHub issueI have an error with storybook and react hooks
Invariant Violation: 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.
at invariant (http://localhost:9001/vendors~main.c08119bb1baee695123a.bundle.js:298423:15)
at Object.throwInvalidHookError (http://localhost:9001/vendors~main.c08119bb1baee695123a.bundle.js:311235:3)
at Object.useContext (http://localhost:9001/vendors~main.c08119bb1baee695123a.bundle.js:334207:21)
at useTheme (http://localhost:9001/vendors~main.c08119bb1baee695123a.bundle.js:185294:55)
at http://localhost:9001/vendors~main.c08119bb1baee695123a.bundle.js:184916:91
at Object.WithStyles [as render] (http://localhost:9001/vendors~main.c08119bb1baee695123a.bundle.js:185385:21)
at extract (http://localhost:9001/vendors~main.c08119bb1baee695123a.bundle.js:188834:38)
at Array.forEach (<anonymous>)
at extract (http://localhost:9001/vendors~main.c08119bb1baee695123a.bundle.js:188825:25)
at extract (http://localhost:9001/vendors~main.c08119bb1baee695123a.bundle.js:188830:11)
Example with the same error here https://github.com/alexnofoget/storybook-issue
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:20 (9 by maintainers)
Top Results From Across the Web
create-react-app MaterialUI Error: Invalid hook call
I want to do Create-react-app and use Material UI, but I get a Hooks Error. Am I missing something else? This is an...
Read more >Material UI error: Invalid hook call. Hooks can only be called ...
Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the...
Read more >Invalid Hook Call Warning - React
Invalid Hook Call Warning ... You are probably here because you got the following error message: Hooks can only be called inside the...
Read more >Invalid hook call error using Material UI : r/reactjs - Reddit
I am working on a React project created with create-react-app that uses material UI and I am getting these errors:.
Read more >67009085/latest-react-hook-form-error-handling-with-material ...
Activating extension 'vscode.typescript-language-features' failed: Could not find bundled tsserver.js.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Found a fix, opened a PR
Yowza!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-rc.3 containing PR #6859 that references this issue. Upgrade today to try it out!
Because it’s a pre-release you can find it on the
@next
NPM tag.Closing this issue. Please re-open if you think there’s still more to do.