Is Styled Components really ready for App Router?
Unanswered
Vaux's Swift posted this in #help-forum
Vaux's SwiftOP
Hey all. I've been a little perturbed that styled-components has clunky support in the App Router in NextJs 13.
I've just tried to move an existing page in the Pages Router to the App Router on our pretty large SAAS product. All our components use styled-components. I noticed a subtle layout shift happening so I turned off JS in the console. All it shows is an SVG and my header markup and nothing else.
I've implemented the configuration on the CSS-in-JS doc page using
##Has anyone else noticed CLS (Cumulative Layout Shift) when using styled-components?
The docs don't mention this but thinking about it, everything is setup to be a client component when using
I've just tried to move an existing page in the Pages Router to the App Router on our pretty large SAAS product. All our components use styled-components. I noticed a subtle layout shift happening so I turned off JS in the console. All it shows is an SVG and my header markup and nothing else.
I've implemented the configuration on the CSS-in-JS doc page using
registry.tsx but my question to you is this?##Has anyone else noticed CLS (Cumulative Layout Shift) when using styled-components?
The docs don't mention this but thinking about it, everything is setup to be a client component when using
registry.tsx so it would make sense that the support isn't so great (yet).