Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@mui/styles is not compatible with React.StrictMode or React 18. #317

Open
3 tasks done
h4rkl opened this issue Aug 8, 2022 · 2 comments
Open
3 tasks done

@mui/styles is not compatible with React.StrictMode or React 18. #317

h4rkl opened this issue Aug 8, 2022 · 2 comments

Comments

@h4rkl
Copy link

h4rkl commented Aug 8, 2022

Checklist

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.

@h4rkl
Copy link
Author

h4rkl commented Aug 8, 2022

Duplicate of #284 and #310

@pisze-programy
Copy link

#285 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants