Skip to content

[Snackbar] v6.4.6 & React 18 regression ownerState failed prop type warning #45477

@reihwald

Description

@reihwald

Steps to reproduce

Steps:

  1. Open this link to live example: https://stackblitz.com/edit/vitejs-vite-zjqfd6gv
  2. Launch the project and open the preview in a new tab
  3. Press the Open Snackbar button
  4. The Snackbar appears but this gets error logged to the console:
    Image
  5. Ether downgrade mui to 6.4.5 or upgrade React to v19 to resolve the issue

The CustomizedSnackbars component is copied from here: https://mui.com/material-ui/react-snackbar/#use-with-alerts (from the Stackblitz version, the Code Sandbox link seems to be broken)

Current behavior

This error gets logged when opening the snackbar for the first time and when using mui 6.4.6 and React 18.x:

Image

Expected behavior

The code should be error free like it was on version 6.4.5

Context

No response

Your environment

npx @mui/envinfo
  Browser does not seem to matter. Happens on FF and Chrome
System:
    OS: Windows 11 10.0.26100
  Binaries:
    Node: 22.14.0 - C:\Program Files\nodejs\node.EXE
    npm: 11.1.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: Not Found
  Browsers:
    Chrome: Not Found
    Edge: Chromium (132.0.2957.115)
  npmPackages:
    @emotion/react: ^11.11.1 => 11.14.0
    @emotion/styled: ^11.11.0 => 11.14.0
    @mui/core-downloads-tracker:  6.4.6
    @mui/icons-material: ^6.0.0 => 6.4.6
    @mui/material: ^6.0.0 => 6.4.6
    @mui/private-theming:  6.4.6
    @mui/styled-engine:  6.4.6
    @mui/system:  6.4.6
    @mui/types:  7.2.21
    @mui/utils:  6.4.6
    @mui/x-data-grid: ^7.0.0 => 7.27.2
    @mui/x-date-pickers: ^7.0.0 => 7.27.1
    @mui/x-internals:  7.26.0
    @types/react: ^18.3.3 => 18.3.18
    react: ^18.3.1 => 18.3.1
    react-dom: ^18.3.1 => 18.3.1
    typescript: ^5.5.4 => 5.8.2

Search keywords: ownerState

Metadata

Metadata

Assignees

Labels

scope: toastChanges related to the toast.type: bugIt doesn't behave as expected.v6.x

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions