niuware / mui-rte

Material-UI Rich Text Editor and Viewer
MIT License
437 stars 168 forks source link

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

Open h4rkl opened 2 years ago

h4rkl commented 2 years ago

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 commented 2 years ago

Duplicate of #284 and #310

pisze-programy commented 1 year ago

https://github.com/niuware/mui-rte/issues/285#issuecomment-975526864