-
-
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
Use a newer version of the code as link examples. #27440
Conversation
The current example points to an old version of the code. Updating the link to one using material-ui next.
No, this is for emotion, not JSS |
@oliviertassinari , I think it is also about the new version, because, for example, MUI 5.x fails on this import:
|
@jackbravo Please check https://next.material-ui.com/guides/migration-v4/. |
😱 oh I see, sorry. But then the link is pointing to an old solution that needs to be updated, but the updated version on the same repo (that I'm pointing at) contains unrelated new emotion goodies that are not relevant for the minimal things needed for a working NextJS SSR project. This would still need fixing, right? |
I don't understand the problem you are facing. Please explain which version you are using, which user path you took to land on a problem. There are TWO versions, with TWO different documentation. |
I'm using MUI 5.x, reading the 5.x docs, following the CSS advanced guide for react which says:
That link is using 4.x code. If I go to the master branch on that repo, it uses 5.x but with all the emotion logic you mentioned is not needed. The next paragraph says:
And it points to the new version of the code I'm using on the PR. |
@jackbravo Ok awesome. Does the change of @mnajdova in #27466 help? This whole section about styles is deprecated. |
Yes it does! I didn't know all this was deprecated :-p. And even emotion/server SSR solution is now deprecated for emotion 10. Seems like the next.js example will need to be updated since it seems to be using emotion/server. Thanks a lot! |
I mean update the example to be more in line with vercel/next.js#17651 and vercel/next.js#17626 |
@jackbravo We have just updated the Next.js examples, they are up to date and correct, what you can see on Next.js's side is wrong. |
The example seems to be using And it is using @emotion/server here, which also seems not recommended now according to their docs.
And also @emotion/cache says is not needed for most cases since it is used with sensible defaults, and only needed if:
Which doesn't seem to be the case. But I'm not sure. |
@jackbravo I'm sorry, I'm unsubscribing.
|
We are following this guide - https://emotion.sh/docs/ssr#on-server |
Right @mnajdova , on that page it says that SSR just works and you don't need to use emotion/server. But I do see that this is part of an already existing thread! My apologies. |
The current example points to an old version of the code. Updating the link to one using material-ui next.