When I run example in nextjs. Do yarn and yarn dev to run the demo application. Hit to http://localhost:3000 then it throw the error is not a function
Can call the createGenerateClasName as usually
Error throwed:
TypeError: (0 , _styles.createGenerateClassName) is not a function
at createContext (/Users/nampdn/Projects/wfc/@example/nextjs/styles/getContext.js:20:3)
at getContext (/Users/nampdn/Projects/wfc/@example/nextjs/styles/getContext.js:35:5)
at Function.MyDocument.getInitialProps (/Users/nampdn/Projects/wfc/@example/nextjs/pages/_document.js:61:3)
at _callee$ (/Users/nampdn/Projects/wfc/@example/nextjs/node_modules/next/dist/lib/utils.js:36:30)
at tryCatch (/Users/nampdn/Projects/wfc/@example/nextjs/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/Users/nampdn/Projects/wfc/@example/nextjs/node_modules/regenerator-runtime/runtime.js:296:22)
at Generator.prototype.(anonymous function) [as next] (/Users/nampdn/Projects/wfc/@example/nextjs/node_modules/regenerator-runtime/runtime.js:114:21)
at step (/Users/nampdn/Projects/wfc/@example/nextjs/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /Users/nampdn/Projects/wfc/@example/nextjs/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14
at new Promise (<anonymous>)
curl https://codeload.github.com/mui-org/material-ui/tar.gz/v1-beta | tar -xz --strip=2 material-ui-1-beta/examples/nextjscd nextjsyarnyarn devhttp://localhost:3000| Tech | Version |
|--------------|---------|
| Material-UI |1.0.0-beta.24 |
| React |16.2|
| browser | Chrome |
| OS | MacOS |
use this.
import createGenerateClassName from 'material-ui/styles/createGenerateClassName';
Thanks @jhbae200, I can get it to work now, brilliant!
It will be fixed with the next beta release.
Released.