TypeError: Cannot read property 'dense' of undefined
See original GitHub issuewhen I use the material-ui in client side ,there is no problem, but when i use the material-ui’s server rendering, once I use the <ListItem>
component , there is a error:
TypeError: Cannot read property ‘dense’ of undefined
the total info:
Warning: Rendering <Context.Consumer.Provider>
is not supported and will be removed in a future major release. Did you mean to render <Context.Provider>
instead?
Warning: Rendering <Context.Consumer.Consumer>
is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer>
instead?
TypeError: Cannot read property ‘dense’ of undefined
at Object.eval [as children] (webpack:///./node_modules/@material-ui/core/ListItem/MergeListContext.js?:28:38)
at recursive (C:\Users\Administrator\Desktop\webpack-demo\node_modules\react-tree-walker\dist\react-tree-walker.js:129:41)
at C:\Users\Administrator\Desktop\webpack-demo\node_modules\react-tree-walker\dist\react-tree-walker.js:153:26
The server rendering config almost same as the official website,at present, the server work out only when I use the <ListItem>
component.
Your Environment 🌎
Tech | Version |
---|---|
Material-UI | v3.5.1 |
React | 16.6.0 |
Browser | chrome |
Node | 10.13.0 |
etc. |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (5 by maintainers)
Top GitHub Comments
@flamecoals Do you have a minimal reproducible example?
I can confirm that downgrading to 3.3.0 works, but still getting this error when using the latest version. I will try to setup a minimal example.