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

[Menu][docs] Fix hydration mismatch error on Base UI's Menu docs #40758

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

michaldudak
Copy link
Member

Entering the Base UI's Menu docs in dev mode triggered a warning saying there's a hydration mismatch. React HTML-encoded the style tag contents on the server, but didn't do it on the client.
With dangerouslySetInnerHTML the problem is gone.

@michaldudak michaldudak added bug 🐛 Something doesn't work docs Improvements or additions to the documentation component: menu This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base labels Jan 23, 2024
@mui-bot
Copy link

mui-bot commented Jan 23, 2024

Netlify deploy preview

https://deploy-preview-40758--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 2ecefd2

Copy link
Member

@mj12albert mj12albert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice ~ 👍

@michaldudak michaldudak merged commit d334bcd into mui:master Jan 23, 2024
19 checks passed
@michaldudak michaldudak deleted the menu-docs-hydration-error branch January 23, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: menu This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation package: base-ui Specific to @mui/base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants