Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 681 Bytes

README.md

File metadata and controls

19 lines (13 loc) · 681 Bytes

Server-side rendering example

How to use

Install it and run:

npm install
npm run start

To see different behaviour on SSR, add injectFirst to StyledEngineProvider inside server.js.

In the network tab, you'll see that the initial response with injectFirst has an empty <style data-emotion="css "></style>-tag and styles are being added to the body instead. If you look at the preview, you'll see that the styles are off: withInjectFirst

Now, if you remove injectFirst, you see that the style-tag is filled with styles, and the preview looks different (correct in my eyes): withoutInjectFirst