jumping css while rendering the page in production
Closed this issue · 9 comments
It seems that the SSR is not doing all the work on the server-side.
Usually I can disable js on the client with SSR app and the app should render perfectly.
Here this is the result of disabling js (top right of the screenshot):
The head tag is kind of empty.
If I re-enable js, refresh and wait 1 second:
Now head include the inline style and the meta.
Do you know how to get the full SSR behavior with with boilerplate?
I see what you're saying. I'll need to play around with styled-components some more. What's going on is the stylesheet generated by styled-components isn't populating in the head with JS disabled.
but this work should be done on the ssr side right? yeah ssr make it a little more complicated.
I found this boilerplate that does exactly that on the redux-ssr branch:
https://github.com/diegohaz/arc
It looks very nice.
@rolele Nearly have a perfect implementation in place. Should be finished later this afternoon.
edit:
Much beter...
that is a great news. I like this starter very much. and I like to know that it is the basis of your boldr repo ( so it is a proof that it scales) thanks for the good work. I will test that and study your commit as soon as it is done.
Any news on this one?
@rolele You should not have any more issues with css not loading properly when JS is disabled.
There is PR https://github.com/strues/react-universal-boiler/pull/18 where I've shown how to fix css jumping issue.