Failed prop type: "deprecatedVariants" is read-only
See original GitHub issueconst theme = createMuiTheme({ typography: { useNextVariants: true, }, });
in both my client.js and server.js , but still whenever I open my console, I receive this error:
index.js:1 Warning: Failed prop type: “deprecatedVariants” is read-only in Typography (created by WithStyles(Typography)) in WithStyles(Typography) (at Layout.js:111) in div (created by Toolbar) in Toolbar (created by WithStyles(Toolbar)) in WithStyles(Toolbar) (at Layout.js:99) in header (created by Paper) in Paper (created by WithStyles(Paper)) in WithStyles(Paper) (created by AppBar) in AppBar (created by WithStyles(AppBar)) in WithStyles(AppBar) (at Layout.js:92) in div (at Layout.js:86) in Layout (created by WithStyles(Layout)) in WithStyles(Layout) (created by WithStyles(WithStyles(Layout))) in WithStyles(WithStyles(Layout)) (created by Connect(WithStyles(WithStyles(Layout)))) in Connect(WithStyles(WithStyles(Layout))) (at home/index.js:19) in MuiThemeProvider (at client.js:101) in App (at client.js:100)
Any suggestions to solve this issue?
Note : My WithStyles is @material-ui/core/styles && withStyle is isomorphic-style-loader/lib/withStyles
_Originally posted by @Arrow891 in https://github.com/mui-org/material-ui/issues/12741#issuecomment-430518133_
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
I have solved the issue by upgradiing to @material-ui/core@^3.2.2 and adding typography: { useNextVariants: true }, while creating Theme.
@Arrow891 Please remove your
node_modules
, install again and post (depending on your package manager)yarn list --pattern @material-ui/core
ornpm ls @material-ui/core