-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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 does not hot reload #2599
Comments
@bobissict – Are you seeing this warning in your console? I haven't dug into this at all but see this warning often. |
super weird, i have another gatsby site that I setup with the Gonna just mark this as closed unless I can recreate the issue again |
There was a recent PR that fixed hot reloading for some stuff so perhaps the older site just needed upgraded. |
I've got the same problem here. I created a new gatsby project based of the default starter, then added the gatsby-plugin-styled-components, imported styled-components and created the first one in pages/index.js When I create a new styled component and use it, hot reloading works fine, but as soon as I change a property of a already loaded styled-component, the hot reload doesn't work and I have to manually refresh. I can see the classes of the component hot reloading, but the css itself stays old. I'm on the newest gatsby version (1.9.80) |
Same problem here ✋ I can see the concerned class beeing updated, but the new CSS properties don't show up. Versions: |
- it doesn't work yet gatsbyjs/gatsby#2599
Sounds like this is the problem styled-components/styled-components#1225 More discussion here: https://spectrum.chat/gatsby-js?thread=b7270640-d077-411f-bda8-0b06a4f67bd3 |
If you downgrade styled components to v2.2.0 it works apparently. |
@KyleAMathews I just tested with v2.2.0, it's working fine. |
@KyleAMathews Thank you |
Downgrading to v2.0.0 did not fix the problem for me. |
Similarly to @Nick-vr, I'm also having this issue |
@nathanjdunn @Nick-vr uninstall the styled-components package and run this again: |
@ziyafenn Thank you! |
Seems fixed by [email protected]. |
Great! Closing this now. |
- it doesn't work yet gatsbyjs/gatsby#2599
- it doesn't work yet gatsbyjs/gatsby#2599
I'm using the Gatsby starter blog with styled components and the hot reloading does not work. It works for everything else, changing JSX etc but it just won't pick up changes from styled components forcing me to have to manually reload the page.
I've tried a bunch of things but nothing seems to work.
I'd appreciate any help as it's driving me crazy.
The text was updated successfully, but these errors were encountered: