Skip to content

More severe hydration problems with styled-components #136

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

Closed
Xiphe opened this issue Jan 19, 2023 · 2 comments
Closed

More severe hydration problems with styled-components #136

Xiphe opened this issue Jan 19, 2023 · 2 comments
Labels
needs-response We need a response from the original author about this issue/PR

Comments

@Xiphe
Copy link

Xiphe commented Jan 19, 2023

Hey there 👋 I recently encountered a pretty severe issue with remix + styled components.

ref styled-components/styled-components#3924

1. Hydration errors in Production

In some cases the hydration errors described commonly when working with sc and remix in dev also happen in production. I'm not able to 100% validate that the errors stem from styled-components but i'm pretty confident. Also it's totally unpredictable when those occur. I have 2 out of ~15 colleges that can reproduce these stably on Chrome. I was not able to reproduce them at all. (Might be related to something like Network Speed, Performance of the Machine or Browser Extensions).

2. Causing unstyled content

When such a hydration error occurs, since Remix operates on the complete document, react throws away EVERYTHING and rebuilds the complete DOM from scratch.
Now styled components might be in a state where it already injected it's <style/> element into the <head /> of the document and won't re-check the presence of that when react re-builds the document. This creates a broken page where all styles from SC are missing.

@github-actions github-actions bot added the needs-response We need a response from the original author about this issue/PR label Mar 20, 2023
@github-actions
Copy link
Contributor

This issue has been automatically closed because we haven't received a response from the original author 🙈. This automation helps keep the issue tracker clean from issues that are unactionable. Please reach out if you have more information for us! 🙂

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 10, 2023
@Xiphe
Copy link
Author

Xiphe commented Apr 11, 2023

ref #167

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-response We need a response from the original author about this issue/PR
Projects
None yet
Development

No branches or pull requests

1 participant