Gatsby: SSR is broken with styled-components

Created on 18 Jun 2018  Â·  4Comments  Â·  Source: gatsbyjs/gatsby

When using the Gatsby styled-component plugin, the layout is currently broken if the very first re-hydration doesn't match perfectly the SSR version — instead of having a small flash and a client rendering as it does without this plugin.

I created a minimal reproduction at https://github.com/mquandalle/repro-gatsby-issue-5993

This should be fixable with the ssr option of the babel plugin for styled-components: https://www.styled-components.com/docs/tooling#serverside-rendering

bug

All 4 comments

I haven't actually tested that yet but I will do it and do a PR if it works.

Any solution for this yet?

Was this page helpful?
0 / 5 - 0 ratings