I use @material-ui/styles in Next.js develop mode. And If I use makeStyles, createStyles add styles to the elements, it will be useless when I refresh the page. After the HMR(after you type something in the source code), the style will be showed.
reproduce bug project on github
npm run dev, start develop modeuseStyle is useless.The style should be useful when enter the http://localhost:3000/ instead of after HMR
Enter http://localhost:3000/ or refresh at http://localhost:3000/

After HMR

Next.js SSR is unaware of your styles when generating the initial page render. Use the MUI example setup with Next.js as a reference.
Note the changes on _app.js and _document.js.
Thanks! @gabrielalmeida I also find the document on the Material-UI Server Rendering
Most helpful comment
Next.js SSR is unaware of your styles when generating the initial page render. Use the MUI example setup with Next.js as a reference.
Note the changes on _app.js and _document.js.