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:
- Created 5 years ago
- Comments:17 (11 by maintainers)
Top 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 >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
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;
@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.