Deprecation error from material-ui
See original GitHub issueWhen completing a file drag action, I get the following error log in the console. (I thing it’s just a log and not a true error).
Not presenting this as critical, just reporting the error message in case it’s helpful. I tried stepping through the debug logs things quickly got convoluted so I’m not sure I can offer much help beyond sharing the message and that SnackbarContentWrapper seems to be the only class using theme.spacing.unit
index.js:1375 Warning: Material-UI: theme.spacing.unit usage has been deprecated.
It will be removed in v5.
You can replace `theme.spacing.unit * y` with `theme.spacing(y)`.
You can use the `https://github.com/mui-org/material-ui/tree/master/packages/material-ui-codemod/README.md#theme-spacing-api` migration helper to make the process smoother.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Catching Material UI deprecation warnings - Stack Overflow
try updating packages npm update I found that the deprecated 'fade' property ... of some material ui components when I updated it the...
Read more >Deprecation warnings when on `4.11.4` · Issue #27265 - GitHub
We are building a web application, our console log shouldn't be littered with "errors" that are actually deprecation warnings. Your Environment ...
Read more >How to solve Material UI error: findDOMNode is ... - Medium
I use Material UI in my project, and this error is constantly displayed in the console. Warning: findDOMNode is deprecated in StrictMode.
Read more >Breaking changes in v5, part two: core components - Material UI
This was an exception to Material Design, and was removed from the specification. ... This component is deprecated because its functionality can be...
Read more >@material-ui/styles - npm
This package has been deprecated. Author message: Material UI v4 doesn't receive active development since September 2021.
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 Free
Top 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
@material-ui v4.0.0 the spacing syntax has been changed, and will be removed in v5
theme.spacing.unit
should simply be changed totheme.spacing(x)
where x is a value to multiply the theme spacing by. They have a more comprehensive explanation here. More on implementation of spacing in v4 here. According to their milestones v5 isn’t set to release until January 2020.@Yuvaleros I updated the package using the following command
npm install --save material-ui-dropzone
The screenshot above shows my terminal window after running the command… Also, there seems to be a new error as well… I’ve attached the screenshot of my browser console below…

I’m not sure if I’m doing something wrong… If you need more info please let me know what info you might need. Thanks!