Doesn't load material-ui v5.0.0-alpha.38 theme on server with nextjs
See original GitHub issueI followed the proposed example: https://github.com/mui-org/material-ui/tree/next/examples/nextjs
This is the code of the theme, where I call dark
import { createTheme } from '@material-ui/core/styles';
const theme = createTheme({
palette: {
mode: "dark",
},
});
export default theme;
And the material-ui issue does load on the client, but as seen in the image not on the server
Prepare an example, if you inspect the element in the network section, select the first element and then in preview, you can see that it is not loading material-ui on the server only on the client
https://codesandbox.io/s/0uo7r?file=/pages/index.js https://0uo7r.sse.codesandbox.io/
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
[examples] cache.compat = true flickering when outside the ...
Clone example nextjs repository; Place any Material-UI component outside ... Doesn't load material-ui v5.0.0-alpha.38 theme on server with ...
Read more >Server-side rendering broken after upgrading to MUI 5 (with ...
I launched the official SSR Next.js implementation. It showed it doesn't work either. Server-side rendering with JavaScript disabled. For more ...
Read more >Setup Material UI With Next.js Typescript - YouTube
jsIn this video we will setup Material UI to work with Next.js Typescript project with client and server side rendering.Starter P...
Read more >Getting started with MUI and Next.js - LogRocket Blog
Configuring MUI and Next.js to work together takes a bit more effort than you may initially think. Learn how to properly start with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can I work on this?
This https://github.com/mui-org/material-ui/issues/26957#issuecomment-877847384 fixes the issue.