-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
Hydration issues still exist with NextJS when applying custom themes #40945
Comments
Hey Jamie 👋 This error message is correct:
You're calling |
Hi @samuelsycamore ! Thanks for the reply. I suppose I don't understand the mechanics of Next 14 too well yet. I am then faced with:
Removing the |
@jamietdavidson It sounds like you'll need to move the exported metadata to a Server Component. This is a Next.js specific issue, so your best bet from here would be to seek help on Stack Overflow. Best of luck! This new paradigm of Server and Client Components can be really tricky to untangle. If you don't have a specific need for the App Router, I might suggest reverting to the Pages Router so you don't have to worry about this stuff at all. |
@samuelsycamore Will do! Thanks for the timely help :) |
And awesome work on Mui Joy, it is leaps and bounds easier to work with than material. Global variants is an amazing idea, and overriding the default props within the theme is genius. |
Cheers @jamietdavidson! I think @siriwatknp deserves most of the praise for Joy UI so hopefully he sees this! 😁 |
@samuelsycamore |
Duplicate of #42750 |
Steps to reproduce
Link to live example: (required)
Steps:
Current behavior
inside of
apps/layout.tsx
:Inside of
@/core/theme/ThemeRegistry
(straight from the docs), with the exception that I've added myApolloProvider
.Browser: Chrome (latest version as of posting)
System:
OS: macOS 14.2.1
Binaries:
Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node
npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
pnpm: Not Found
Browsers:
Chrome: 121.0.6167.139
Edge: Not Found
Safari: 17.2.1
npmPackages:
@emotion/react: ^11.11.3 => 11.11.3
@emotion/styled: ^11.11.0 => 11.11.0
@mui/base: 5.0.0-beta.33
@mui/core-downloads-tracker: 5.15.6
@mui/icons-material: ^5.15.6 => 5.15.6
@mui/joy: ^5.0.0-beta.24 => 5.0.0-beta.24
@mui/material: 5.15.6
@mui/private-theming: 5.15.6
@mui/styled-engine: 5.15.6
@mui/system: ^5.15.6 => 5.15.6
@mui/types: 7.2.13
@mui/utils: 5.15.6
@types/react: ^18 => 18.2.48
react: ^18 => 18.2.0
react-dom: ^18 => 18.2.0
typescript: ^5 => 5.3.3
The text was updated successfully, but these errors were encountered: