kriasoft / isomorphic-style-loader

CSS style loader for Webpack that is optimized for isomorphic (universal) web apps.

Home Page:https://reactstarter.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

damiangreen opened this issue · comments

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

duplicated with #155

commented

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"
},