react-css-grid icon indicating copy to clipboard operation
react-css-grid copied to clipboard

Error during Serverside Rendering

Open ckeeney opened this issue 7 years ago • 1 comments

I tried adding this to my next.js project. It works fine client side but server side I get the following error.

styleSheet.getName is not a function
TypeError: styleSheet.getName is not a function
    at ComponentStyle.generateAndInjectStyles (my-project/node_modules/react-css-grid/node_modules/styled-components/lib/models/ComponentStyle.js:95:37)

Hopefully this problem would go away after #5 is resolved, because I'm going to try styled-system next.

ckeeney avatar Sep 12 '18 23:09 ckeeney

styled-system will definitely work if you wanna go that route. For SSR with this package, make sure you have everything set up like here https://github.com/zeit/next.js/tree/canary/examples/with-styled-components

But, there might be an issue with styled-components being a hard dependency in this package

jxnblk avatar Sep 13 '18 00:09 jxnblk