next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Next 13: How to implement SSR rendering with styled-components?

Open damassi opened this issue 3 years ago • 0 comments

What is the improvement or update you wish to see?

With the new layouts paradigm, its unclear how to implement SSR rendering for styled-components.

Is there any context that might help us understand?

Before, one would implement this in _document.tsx in getInitialProps, via ctx.renderPage, thereby executing the collectStyles function.

See the Next.js example code.

It is unclear how to recreate this functionality using layout.tsx within an app directory.

Does the docs page already exist? Please link to it.

No response

damassi avatar Oct 29 '22 07:10 damassi