Spectrum flash of unstyled content (FOUC) #6462
Unanswered
cheema-corellian
asked this question in
Q&A
Replies: 1 comment
-
I'm not sure what we can do about it, we rely on media queries to determine light or dark mode. Those don't work until you're on the client. You could set the colorScheme on your provider on the server if you know ahead of time through a user setting, then you shouldn't have the issue. https://react-spectrum.adobe.com/react-spectrum/Provider.html#color-schemes If I've missed the gist here, a stackblitz would definitely be helpful |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Has anybody noticed a flash of unstyled content (FOUC) with Spectrum React on page load? At first I thought I was doing something wrong, but then I was able to reproduce the issue in a brand new sandbox repo with just the Spectrum React button component and nothing else. With and without the Adobe Clean font. And then I noticed at least one person on YouTube talk about it as being a problem as well.
I can create a Stackblitz example if it is needed.
Has anybody else around here noticed it? Is there a solution or workaround for it?
In Next.js, it is very visible in dev builds and a little more subtle in production builds.
Beta Was this translation helpful? Give feedback.
All reactions