Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[system] Add ThemeProvider noSsr to prevent double rendering #44451

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Nov 18, 2024

closes #43263

Context

The current implementation contains rerendering to make the mode initially undefined on the client to prevent any hydration mismatch.

However, for apps that does not need this double rendering behavior they could not opt-out. This PR introduces a flag to opt-out this behavior.

The use case for this flag are:


@siriwatknp siriwatknp added the package: system Specific to @mui/system label Nov 18, 2024
@siriwatknp siriwatknp changed the title [system] Add disableExtraRender to prevent extra rerendering [system] Add disableClientRerender to prevent extra rerendering Nov 18, 2024
@siriwatknp siriwatknp added the enhancement This is not a bug, nor a new feature label Nov 18, 2024
@mui-bot
Copy link

mui-bot commented Nov 18, 2024

Netlify deploy preview

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 837c1a4

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Nov 18, 2024
@siriwatknp siriwatknp changed the title [system] Add disableClientRerender to prevent extra rerendering [system] Add noSsr to prevent double rendering Nov 25, 2024
@siriwatknp siriwatknp changed the title [system] Add noSsr to prevent double rendering [system] Add ThemeProvider noSsr to prevent double rendering Nov 25, 2024
@siriwatknp siriwatknp marked this pull request as ready for review November 25, 2024 04:25
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is not a bug, nor a new feature package: system Specific to @mui/system v6.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Material UI 6 CssVarsProvider causes Suspense to reload async components
2 participants