@mui/styles has inconsistent react types #41841
Labels
package: system
Specific to @mui/system
status: waiting for maintainer
These issues haven't been looked at yet by a maintainer
Steps to reproduce
Link to live example: (required)
Steps:
npm i
in a package using react and @types/react v18+ that also has @mui/styles in the dependency treeCurrent behavior
The console prints warnings related to conflicting peer dependencies for react
Expected behavior
There are no console warnings when using react 18.
Context
I understand that @mui/styles does not support react v18 and is deprecated, but the package.json should reflect other MUI packages and include react v18 in the list of supported peer dependencies or the supported react versions should be consistent between the two. Right now supporting @types/react v17 || v18 is not consistent with restricting react access.
Your environment
npx @mui/envinfo
System:
OS: Windows 11 10.0.22631
Binaries:
Node: 18.8.0 - C:\Program Files\nodejs\node.EXE
npm: 9.9.2 - C:\Program Files\nodejs\npm.CMD
pnpm: Not Found
Browsers:
Chrome: Not Found
Edge: Chromium (123.0.2420.81)
npmPackages:
@emotion/react: 11.11.4
@emotion/styled: 11.11.5
@mui/base: 5.0.0-beta.40
@mui/core-downloads-tracker: 5.15.15
@mui/lab: 5.0.0-alpha.170
@mui/material: 5.15.15
@mui/private-theming: 5.15.14
@mui/styled-engine: 5.15.14
@mui/system: 5.15.15
@mui/types: 7.2.14
@mui/utils: 5.15.14
@mui/x-data-grid: 6.19.9
@mui/x-data-grid-pro: 6.19.9
@mui/x-date-pickers: 6.19.9
@mui/x-date-pickers-pro: 6.19.9
@mui/x-license-pro: 6.10.2
@mui/x-tree-view: 6.17.0
@types/react: 18.2.74
react: ^18.2.0 => 18.2.0
react-dom: ^18.2.0 => 18.2.0
typescript: 4.9.5
Search keywords: react, mui/styles, react-types
The text was updated successfully, but these errors were encountered: