-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[examples] Next.js example rendering issues #32644
Comments
A ticket was opened in the NextJs repo with the same problem. It seems NextJs related due to the version segments where you can observe the problem from happening and those which are not affected; NextJs 12.1.5 works perfectly fine even with React 18 in place; 12.1.6, on the other hand, shows the distortion. Update: Thx! |
You can remove the cache component from the _app file, and the FOUC will disappear. I'm still trying to get to the bottom of this weird issue. |
Yes this fixed it but what is the purpose of that Cache component? |
The problem is fixed in NextJs 12.1.7-canary.4 which was also released to NPM. For reference see vercel/next.js#36792 |
@aligajani that's still a good question to me. At this point I consider suggesting not to use it because the more I think and read about this; the more I come to the conclusion that CSS is already provided in the server code, and a cache isn't needed on the client-side. But I've been looking from a non-SSR point of view up until this point. I'm going to test with and without the component, in the various ways nextjs (especially) renders, and see what results I come up with. I've limited time though, so investigations are not going super quick. I've tested the new canary version without the cache components, in all the apps I have with next/mui, and it still works perfectly. |
@MathiasKandelborg Thanks for your reply. I just updated to canary.7 and they patched it. |
Seems like it is the same issue as #30410 (comment). I can confirm that the issue existed in next |
I am closing this issue then. |
Duplicate of #30410 |
Duplicates
Latest version
Current behavior 😯
Hi,
If you will try to use official Next.js (TypeScript version) example and refresh a page you will see that something is wrong with styles (maybe rehydration error):
Screen.Recording.2022-05-05.at.21.17.36.mov
The same behavior exists locally and even on production build of this example
Expected behavior 🤔
Styles looks fine when you refresh page
Steps to reproduce 🕹
Steps:
Context 🔦
However if you will use react 17 instead of 18, then example works fine
Your environment 🌎
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: