Skip to content

[system] createTheme() shouldn't have "use client" #42750

Open
@oliviertassinari

Description

Steps to reproduce 🕹

Link to live example:

Steps:

  1. Create a project with Next.js
  2. Add in the layout
import { getInitColorSchemeScript } from '@mui/material/styles';

  return (
    <html lang="en">
      <head>
        {getInitColorSchemeScript()}
      </head>

Current behavior 😯

Screenshot 2023-09-16 at 22 00 32

Expected behavior 🤔

It works

Context 🔦

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

bug 🐛Something doesn't worknextjspackage: systemSpecific to @mui/systemready to takeHelp wanted. Guidance available. There is a high chance the change will be accepted

Projects

  • Status

    Selected

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions