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.

Typography deprecration warning when using Drawer component, temporary or persistent variants

See original GitHub issue
  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

No warnings.

Current Behavior

Warning via the browser’s console

Steps to Reproduce

Add the Drawer component and choose either the ‘temporary’ or ‘persistent’ variants. Both will show the console warning in the browser.

Context

It’s not a big issue but just wanted to bring up that trying to use either variant listed above will cause the typography deprecation warning to pop up:

Warning: Material-UI: you are using the deprecated typography variants that will be removed in the next major release.
Please read the migration guide under https://material-ui.com/style/typography#migration-to-typography-v2

The permanent variant displays no warnings.

Your Environment

Tech Version
Material-UI v3.2.2
React v16.6.0
Browser Affected Firefox and Chrome

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:17 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
gerhatcommented, Nov 7, 2018

I also was seeing the warnings when running tests so I added the following in my setupTest.js window.__MUI_USE_NEXT_TYPOGRAPHY_VARIANTS__ = true;

1reaction
tonymckendrycommented, Nov 5, 2018

@oliviertassinari I had updated to 3.4.0 right before I posted this hoping that maybe the warning would have gone away or changed since 3.3.2.

However, despite reading this thread I did not see that I needed to add the useNextVariants option into my themes, as pointed out in the guide linked by @eps1lon which seems to have made the warnings go away.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typography deprecration warning when using Drawer ...
Add the Drawer component and choose either the 'temporary' or 'persistent' variants. Both will show the console warning in the browser. Context.
Read more >
material-ui Drawer - findDOMNode is deprecated in StrictMode
This warning is due to the Transition component which is used in many of the material-ui components like Drawer, Tooltip, Snackbar etc.
Read more >
material-ui/core/CHANGELOG.md - UNPKG
710, - [DialogContentText] Fix typography deprecation warning with ... material-ui.com/demos/drawers/#swipeable-temporary-drawer) component (#9730) @leMaik.
Read more >
@rmwc/typography | Yarn - Package Manager
Typography. Material Design's text sizes and styles were developed to balance content density and reading comfort under typical usage conditions.
Read more >
Migration from v4 to v5 - MUI
This is because we are going to use @mui/styles temporarily (JSS style-engine) ... If you want to use MUI Core v5 with styled-components...
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