[system] createTheme() shouldn't have "use client" #42750
Open
Description
Steps to reproduce 🕹
Link to live example:
Steps:
- Create a project with Next.js
- Add in the layout
import { getInitColorSchemeScript } from '@mui/material/styles';
return (
<html lang="en">
<head>
{getInitColorSchemeScript()}
</head>
Current behavior 😯
Expected behavior 🤔
It works
Context 🔦
- Improve Next.js support #34905
- [core] Remove unused use client #38967
- https://twitter.com/amanzrx4/status/1742985809316417913
Your environment 🌎
npx @mui/envinfo
Don't forget to mention which browser you used.
Output from `npx @mui/envinfo` goes here.
Search keywords:
Search keywords:
Metadata
Assignees
Labels
Projects
Status
Selected