-
Notifications
You must be signed in to change notification settings - Fork 29.4k
Closed
Labels
DocumentationRelated to Next.js' official documentation.Related to Next.js' official documentation.
Description
What is the improvement or update you wish to see?
Emotion maintainer here 👋
We got an issue report about a change in behavior with React 18 and Next.js here. I've managed to diagnose this a little bit and it seems that the issue is, at least partially, related to:
- hitting a React 18 code branch here that is supposed to render the shell early to the stream
- calling the provided
_document.getInitialProps
later on here
This creates a "double render" of sorts and the first render is not wrapped/enhanced with the Emotion's CacheProvider
as that is used in the _document
(here).
I've looked through the docs but I'm not sure how to reliably wrap the whole app with a component. Using _document.getInitialProps
is recommended by the Material UI team to be compatible with SSG, see here
Is there any context that might help us understand?
No further context, everything was put in the main description of the issue.
Does the docs page already exist? Please link to it.
No response
garronej, AleksandarDev, sdornan, srmagura, iansjk and 4 more
Metadata
Metadata
Assignees
Labels
DocumentationRelated to Next.js' official documentation.Related to Next.js' official documentation.