mui / mui/material-ui

New `noSsr` prop of ThemeProvider throws warning

Open
#44,576 4 comments 0 reactions 1 assignee View on GitHub

@siriwatknp is already working on this.

Since Nov 27, 2024.

scope: system
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Steps to reproduce

Steps:

  1. Open this link to live example: https://stackblitz.com/edit/react-yeet9i?file=Demo.tsx
  2. Look into console
Current behavior

Console warning:

Warning: Failed prop type: The following props are not supported: `noSsr`. Please remove them.
at ThemeProvider (https://react-yeet9i.stackblitz.io/turbo_modules/@mui/system@6.1.9/ThemeProvider/ThemeProvider.js:55:5)
at ThemeProviderNoVars (https://react-yeet9i.stackblitz.io/turbo_modules/@mui/material@6.1.9/node/styles/ThemeProviderNoVars.js:15:10)
at ThemeProvider (https://react-yeet9i.stackblitz.io/turbo_modules/@mui/material@6.1.9/node/styles/ThemeProvider.js:16:3)
at BasicButtons
at StyledEngineProvider (https://react-yeet9i.stackblitz.io/turbo_modules/@mui/styled-engine@6.1.9/node/StyledEngineProvider/StyledEngineProvider.js:56:5)
Expected behavior

No console warning.

Context

Release of v6.1.9 adds new noSsr prop for ThemeProvider: https://github.com/mui/material-ui/releases/tag/v6.1.9

https://github.com/mui/material-ui/pull/44451

Your environment
npx @mui/envinfo

Google Chrome Version 131.0.6778.86 (Offizieller Build) (arm64)

  System:
    OS: macOS 15.1.1
  Binaries:
    Node: 22.11.0 - /usr/local/bin/node
    npm: 10.9.0 - /usr/local/bin/npm
    pnpm: Not Found
  Browsers:
    Chrome: 131.0.6778.86
    Edge: Not Found
    Safari: 18.1.1
  npmPackages:
    @emotion/react: 11.13.5 => 11.13.5 
    @emotion/styled: ^11.13.5 => 11.13.5 
    @mui/core-downloads-tracker:  6.1.9 
    @mui/icons-material: ^6.1.9 => 6.1.9 
    @mui/material: ^6.1.9 => 6.1.9 
    @mui/private-theming:  6.1.9 
    @mui/styled-engine:  6.1.9 
    @mui/system: ^6.1.9 => 6.1.9 
    @mui/types:  7.2.19 
    @mui/utils:  6.1.9 
    @mui/x-date-pickers: ^7.22.3 => 7.22.3 
    @mui/x-internals:  7.21.0 
    @types/react: ^18.3.12 => 18.3.12 
    react: ^18.3.1 => 18.3.1 
    react-dom: ^18.3.1 => 18.3.1 
    typescript: ^5.7.2 => 5.7.2 

Search keywords: ThemeProvider noSsr

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.