Warning "Material-UI: this elevation `1` is not implemented" with disableGeneration to true
See original GitHub issue- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
Expected Behavior 🤔
No warning should occur.
Steps to Reproduce 🕹
This issue happens in SSR. On the server.
We use ServerStyleSheets
with disableGeneration
to true (for performance gains).
const sheetsPrepass = new ServerStyleSheets({ disableGeneration: true });
and wrap the react element such as this sheetsPrepass.collect(reactElement)
.
The issue occurs only when disableGeneration
is set to true.
I think this is due to this. classes
is empty with disableGeneration
on the server, while it’s not in other cases. I’m not sure how it should be fixed though.
I don’t think a codesandbox si necessary here as most of the information is there.
Thank you 🚀 !
Tech | Version |
---|---|
Material-UI | v4.9.5 |
React | v16.12.0 |
Browser | NodeJS on the server |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:10 (9 by maintainers)
Top Results From Across the Web
Warning "Material-UI: this elevation 1 is not implemented" with ...
The issue occurs only when disableGeneration is set to true. I think this is due to this. classes is empty with disableGeneration on...
Read more >Material-UI: "The key provided to the classes property is not ...
I am using the withStyles() HOC to override some MUI component styles, theme and breakpoints. There is obviously something I do not understand ......
Read more >Paper API - Material UI - MUI
elevation, integer, 1. Shadow depth, corresponds to dp in the spec. It accepts values between 0 and 24 inclusive. square, bool, false. If...
Read more >Migration from v3 to v4 - Material UI - MUI
This is implemented by using React.forwardRef() . This affects the internal component tree and display name and therefore might break shallow or snapshot...
Read more >Breaking changes in v5, part two: core components - Material UI
Change the CSS rules that use [data-focus="true"] to use .Mui-focused . The data-focus attribute is not set on the focused option anymore; instead, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nesso-pfl I don’t think that we can use the prop-type check anymore. Something in this order (maybe need to improve the warning message)
As far as I know, the problem still stand. We rely on the classes, while we should depend on the theme.