Un stable rendering of production build for material UI example for nextJS
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
When page is reloaded, the render should be stable. It is correct in the development build, i.e when I do npm run dev
Current Behavior
When page is loaded, the render is unstable. It happens when I run npm run build
and npm run start
Steps to Reproduce (for bugs)
Following the instructions at https://github.com/zeit/next.js/tree/canary/examples/with-material-ui-next
- curl https://codeload.github.com/callemall/material-ui/tar.gz/v1-beta | tar -xz --strip=2 material-ui-1-beta/examples/nextjs
- cd nextjs
- npm run build
- npm run start
Context
Your Environment
Tech | Version |
---|---|
Material-UI | 1.0.0-beta.25 |
React | 16.2.0 |
browser | Chrome 63.0.3239 on MacBook |
Next | 4.2.1 |
Issue Analytics
- State:
- Created 6 years ago
- Comments:27 (10 by maintainers)
Top Results From Across the Web
Un stable rendering of production build for material UI ...
I am now reading how HTML code is generated using nextjs framework, to understand why there is a curl difference between two setups....
Read more >Material UI breaks NextJS app in production - Stack Overflow
The app compiles and builds without errors when I run "next build". When I run it with NODE_ENV=production, the webpage renders just fine...
Read more >Next.js by Vercel - The React Framework
Production. Next.js gives you the best developer experience with all the features you need for production: hybrid static & server rendering, TypeScript support, ......
Read more >Next.js with Material-UI - ITNEXT
Material UI offers React components for faster and easier web development. You can create your own design system, or start with Material Design....
Read more >Building The Real App With React Query - Smashing Magazine
The application is written in TypeScript and uses CRA, React query, Axios mock server and material UI for easier prototyping.
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
@bendiy
I then refresh the browser, It looses it's style and renders weird and throws the error
I have this exact issue.@oliviertassinari I started a project recently and was looking at after.js and next.js as being the source of this issue, but I think the closest I’ve come to an actual solution is your comment:
It's the sign your class name generator is shared between different request
. Could you please explain where in a project I should be declaringcreateGenerateClassName
and how to make the styling stick on further requests?My code:
@credifiable Sorry, but you seem to be the only one affected. We can’t do anything without being able to reproduce. Keeping the issue open won’t help with the exposure, most people use the search of GitHub to find old issues they are suffering. Maybe someone will face the same issue and dig into the rabbit hole.
@JeromeFitz Thank you for the live environment.