-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
Flash of no theme (zero-config ThemeProvider, Next 14, not Cloudflare) #237
Comments
When I use next-intl and nextui, switching languages causes flickering.
Screen.Recording.2023-11-28.at.01.36.47.movThere is a chance that flickering will not occur. when change language:
https://github.com/1111mp/next-temp-app This is the code repository. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm having some trouble debugging why I'm seeing a flash of no theme on oldfriends.studio. I see this only in production. Here's a video of the issue:
Old.Friends.Engineering.Studio-Friday-November-24-2023-10.28.48AM.mp4
You can see that there's a brief moment where the
html
tag has the theme injected, then it loses the attributes, then they kick back in. In that moment between, it flashes the white background, which is the default in CSS. It should use my system default of dark.My
providers.tsx
:The top of my root
layout.tsx
:This site does allow the user to
setTheme
, but this is only called inside anonClick
handler, so I don't think that should be effecting initial visits. I recorded the video when pulling up the site for the first time in an incognito window.The text was updated successfully, but these errors were encountered: