Skip to content
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

Broken on React 16.10 - Invariant Violation: Invalid hook call. Hooks can only be called inside of the body of a function component. #170

Open
damiangreen opened this issue Oct 2, 2019 · 2 comments

Comments

@damiangreen
Copy link

Stack trace:

  - react.development.js:1533
    [my-code/[isomorphic-style-loader]/[react]/cjs/react.development.js:1533:26

  - react.development.js:1536 resolveDispatcher
    [my-code/[isomorphic-style-loader]/[react]/cjs/react.development.js:1536:5

  - react.development.js:1541 Object.useContext
    [my-code/[isomorphic-style-loader]/[react]/cjs/react.development.js:1541:20

  - useStyles.js:21 useStyles
    [my-code/[isomorphic-style-loader]/src/useStyles.js:21:25****

I suspect this line


is breaking the rule of hooks because it is running an effect conditionally

@async3619
Copy link

async3619 commented Oct 31, 2019

duplicated with #155

@unbugx
Copy link

unbugx commented Dec 24, 2020

unfortunately, this package looks like abandoned :(
I used this to be sure that everything uses this version react in package.json:

"resolutions": {
"react": "17.0.1",
"react-dom": "17.0.1"
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants