ef43460 Jun 24, 2018
5 contributors

Users who have contributed to this file

@kof @typical000 @TrySound @102 @Graham42
12 lines (6 sloc) 812 Bytes

Server-Side Rendering

  1. Render the document.

    The only JSS specific thing you need to know is the Style Sheets registry. It will allow you to get all attached sheets as a CSS string. Rendering of the document depends on the framework you use, here is an example in react.

  2. Rehydration.

    Once JS on the client is loaded, components initialized and your JSS styles are regenerated, it's a good time to remove server-side generated style tag in order to avoid side-effects, example in react.

Here is a live demo with react, ssr and react-jss.