-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Mistmatch error when using styled function with mui components #42197
Comments
Having same issue, please LMK as well, Issue is Classname mismatch with the client and server. Every time Mui generates new classname which doesn't match with client side. I'm following https://mui.com/material-ui/integrations/nextjs/ to start with Nextjs 14 (App router) and Mui v5 project /app/layout.tsx
|
@sawa-ko I am not able to reproduce the issue in the CodeSandbox you provided. Also, did you take a look at this page: https://mui.com/material-ui/guides/server-rendering/? |
Hi @ZeeshanTamboli, thanks for reply, visit the /home route. |
I am opting out to take a look at this issue. Assigning it back to Jun. |
@sawa-ko Please upgrade Note: there is a behavior change, you should revisit the App Router integration guide. |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note We value your feedback @sawa-ko! How was your experience with our support team? |
Steps to reproduce
Link to live example: https://codesandbox.io/p/github/sawa-ko/nextjs-app-router-mui-bug/draft/sharp-james
Steps:
Current behavior
Currently you get a mismatch error message when using the dark theme, this does not happen with the light theme.
Expected behavior
To be able to style the component correctly without mismatch errors.
Context
I want the ListItemButton component to have different colors and rounded edges when set to selected.
Your environment
npx @mui/envinfo
Search keywords: mismatch styled, mismatch styled component, styled, styled utility
The text was updated successfully, but these errors were encountered: