`@mui/styles` is not compatible with React.StrictMode or React 18.
h4rkl opened this issue · 2 comments
h4rkl commented
Checklist
- This is not covered in the repository examples.
- I am using the package latest version.
- This is a bug report or an enhancement proposal.
Background
Directly related to issue TypeError: theme.spacing is not a function
Description
Anyone getting TypeError: theme.spacing is not a function
looks like quite a major bug as import { ThemeProvider } from '@mui/styles'
isn't compatible with React 18 and import { ThemeProvider } from '@mui/material/styles'
is the documented correct way to implement theming on mui which includes a tonne of dependancies in the docs like dark mode
etc.
To read about the implications of using legacy import for @mui/styles
go here.
pisze-programy commented