Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

styled-components example doesn't server render well #1381

Closed
sergiodxa opened this issue Mar 10, 2017 · 0 comments
Closed

styled-components example doesn't server render well #1381

sergiodxa opened this issue Mar 10, 2017 · 0 comments

Comments

@sergiodxa
Copy link
Contributor

I tried the styled-components example and in the server render process it writes the styles directly in the HTML instead of rendering them inside a <style> tag.

Example with JS disabled
screen shot 2017-03-09 at 22 58 19

Example with JS enabled
screen shot 2017-03-09 at 22 59 27

This is due this line (https://github.com/zeit/next.js/blob/master/examples/with-styled-components/pages/_document.js#L7) return an string without the <style> tag and Next.js expect the style prop to have the tag.

@lock lock bot locked as resolved and limited conversation to collaborators May 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant