Material-ui: Components flicker during server side render for nextjs

Created on 5 Sep 2017  路  5Comments  路  Source: mui-org/material-ui

Problem description

Components flicker during server side render for nextjs

Steps to reproduce

  1. Clone or download repo v1.0.0-beta.8
  2. cd to examples/nextjs
  3. npm install
  4. npm build
  5. npm start

Versions

  • Material-UI: v1.0.0-beta.8
  • React: 15.6.1
  • Browser: Version 59.0.3071.115 (Official Build) (64-bit)
    muiflickernext

The create-react-app version works without issues.

Most helpful comment

Hi,

go to: https://github.com/mui-org/material-ui/tree/master/examples/nextjs
copy the code from:
/pages/_app.js
/pages/_document.js
/src/getPageContext.js

and make it work with your structure.

That worked with me. Good luck.

All 5 comments

What's the hash commit you are relying on? The issue should have been fixed in #7977

I confirm I have just tried on 177a6f56388a43948ab365dd5c1d0ba6131adf9a. It's all good.

I am experiencing the same issue, with latest nextjs, how is it solve, sorry is not so clear for me.

Hi,

go to: https://github.com/mui-org/material-ui/tree/master/examples/nextjs
copy the code from:
/pages/_app.js
/pages/_document.js
/src/getPageContext.js

and make it work with your structure.

That worked with me. Good luck.

This behavior still persists only on windows, with the example of nextjs

Was this page helpful?
0 / 5 - 0 ratings