Chrome extension breaks styled in SSR
See original GitHub issueCurrent behavior:
Styled is broken by some browser extensions. For example: Urban VPN Proxy
To reproduce: A minimal reproduction demo is created here with detailed description.
Expected behavior:
Extension should not affect styled
if not intensional.
Environment information:
react
version: ^18.2.0@emotion/react
version: ^11.10.5
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
SSR: class order is not persisted #3321 - GitHub
When using styled from styled-components for overriding the styles of some Material-UI component, it works on the first load and then breaks ......
Read more >Styled component, breaks on google chrome - Stack Overflow
Styled component breaks on google chrome when changing the prop (form true to false for example). When props are changed styled component ...
Read more >Why We're Breaking Up with CSS-in-JS - DEV Community
Runtime CSS-in-JS libraries work by inserting new style rules when components render, and this is bad for performance on a fundamental level. 2....
Read more >FAQs - styled-components
styled -components v5 does not introduce any breaking public API changes, and adds the following: Total rewrite of the core stylesheet engine, ...
Read more >Server Side Rendering - Emotion
import { renderToString } from 'react-dom/server' import App from '. ... The rendered output will insert a <style> tag above each element with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @Andarist for looking into it and @flappyBug for the workaround. Another thing that gets rid of the issue is taking the Chakra UI approach to set up emotion: https://chakra-ui.com/getting-started/remix-guide
@lucascurti Currently we have a workaround to remove all the elements we don’t recognize before hydration. e.g. in your entry.client.tsx, before hydration:
One drawback of this approach is that it may partially break some extensions’ functionality. I didn’t test it though, one may restore it after hydration: