Next.js example

How to use

Download the example or clone the repo:

curl https://codeload.github.com/mui-org/material-ui/tar.gz/next | tar -xz --strip=2  material-ui-next/examples/nextjs
cd nextjs

Install it and run:

npm install
npm run dev

or:

Edit on CodeSandbox

The idea behind the example

Next.js is a framework for server-rendered React apps.

Troubleshooting

Warning: Prop className did not match.

If you get this warning, please make sure that you configure getInitialProps in pages/_document.js correctly. Check the code in this example for more details.