You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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! 🙂
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.The text was updated successfully, but these errors were encountered: