-
Notifications
You must be signed in to change notification settings - Fork 29.5k
Closed
Description
I was running in to issues with next.js and styled-components for a big project, and in an attempt to try and isolate the problem I've cloned the styled-component example in the repo and added a simple theme, immediately I saw the issue. While the server renders the component fine, on the client the style disappears and React throws the famous warning Warning: React attempted to reuse markup in a container but the checksum was invalid.
I've created a repository to demonstrate this issue.
https://github.com/rovansteen/next-js-styled-components
All I basically did was replace the hardcoded color: red
to color: ${props => props.theme.color}
Metadata
Metadata
Assignees
Labels
No labels