niuware / mui-rte

Material-UI Rich Text Editor and Viewer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

h4rkl opened this issue · comments

commented

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.

commented

Duplicate of #284 and #310