material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

Server side rendering not working as expected

Open kkotwal94 opened this issue 8 years ago • 2 comments

https://stackoverflow.com/questions/47647813/server-side-rendering-with-material-ui-1-and-nodejs-react

I'm not really sure what im doing wrong, i'm following the docs, I guess another question I have is do I have to use jss the way that its demonstrated. I have a link to my repo as well in the stack overflow post. I want to use post css to add styles to my components instead. I'm also pretty new to all of this, searching around the internet has given me a few ideas that I've tried but none have really worked out for me.

kkotwal94 avatar Dec 06 '17 01:12 kkotwal94

You need to make sure the following flow of execution is respected:

  1. ReactDOM.renderToString() is called
  2. sheetsRegistry.toString() is called

It won't work the other way around as it's done in your GitHub repository.

oliviertassinari avatar Dec 06 '17 09:12 oliviertassinari

^Asked question on github, just a heads up for whenever you get time

kkotwal94 avatar Dec 07 '17 05:12 kkotwal94