question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deprecation error from material-ui

See original GitHub issue

When 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:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
indecent-aardvarkcommented, Jul 26, 2019

@material-ui v4.0.0 the spacing syntax has been changed, and will be removed in v5 theme.spacing.unit should simply be changed to theme.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.

0reactions
saumyakarancommented, Oct 14, 2019

@Yuvaleros I updated the package using the following command npm install --save material-ui-dropzone Screenshot 2019-10-14 at 8 25 23 PM

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… Screenshot 2019-10-14 at 8 33 28 PM Screenshot 2019-10-14 at 8 33 39 PM

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found