[material-ui][joy-ui] Add InitColorSchemeScript for Next.js App Router#42829
[material-ui][joy-ui] Add InitColorSchemeScript for Next.js App Router#42829siriwatknp merged 7 commits intomui:masterfrom
InitColorSchemeScript for Next.js App Router#42829Conversation
InitColorSchemeScript for Next.js App Router (#42247)InitColorSchemeScript for Next.js App Router
Netlify deploy preview
@material-ui/core: parsed: +0.11% , gzip: +0.14% Bundle size reportDetails of bundle changes (Toolpad) |
| ### Avoiding screen flickering | ||
|
|
||
| To [prevent the UI from flickering](/joy-ui/main-features/dark-mode-optimization/#the-problem-flickering-on-first-load), apply `getInitColorSchemeScript()` before the main application script-it varies across frameworks: | ||
| To [prevent the UI from flickering](/joy-ui/main-features/dark-mode-optimization/#the-problem-flickering-on-first-load), apply `<InitColorSchemeScript />` before the main application script-it varies across frameworks: |
There was a problem hiding this comment.
| To [prevent the UI from flickering](/joy-ui/main-features/dark-mode-optimization/#the-problem-flickering-on-first-load), apply `<InitColorSchemeScript />` before the main application script-it varies across frameworks: | |
| To [prevent the UI from flickering](/joy-ui/main-features/dark-mode-optimization/#the-problem-flickering-on-first-load), add the `<InitColorSchemeScript />` component before the `<CssVarsProvider />` component: |
Maybe rephrase, as it is no longer a script.
mnajdova
left a comment
There was a problem hiding this comment.
I've added one comment on the instructions. As it is cherry-pick I am not diving too deep into the implementaiton.
…/InitColorSchemeScript
|
Thanks @siriwatknp To double-check, is the deprecation notice intentional for the v5? |
Yes, the deprecation should happen on v6. I will open another PR to remove the warning. |
Cherry picked from #42247 to unblock MUI X on mui/mui-x#13712