[MUI v6] Setting default mode flickers the light/dark theme at first render #43972
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 the initial issue: #43622
Steps:
light
dark
mode and then changes tolight
, causing flickeringMake sure to re-open the page in incognito mode or change the
modeStorageKey
. Otherwise, the key will be stored and you won't notice any flickering.Here is a deployed example: https://profound.academy
Current behavior
If your system default mode is
dark
, and you set your website default theme to belight
, the very first render isdark
, which then switches tolight
, causing flickering. That's pretty unpleasant for the visitors.Expected behavior
It should render using the
defaultMode
right away without any flickering.Context
No response
Your environment
npx @mui/envinfo
Using Chrome
Search keywords: default mode, flickering, MUI v6
The text was updated successfully, but these errors were encountered: