-
Notifications
You must be signed in to change notification settings - Fork 78
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 partially styled content on page load #1525
Comments
I posted the following in Next.js's Discord server:
|
I tried the
It's weird because the original code from
The To prevent Vite from being so smart, the component can be imported directly into the Next.js app rather than the design system. |
So, neither The documentation for One option is to upgrade to the |
According to The Future of Chakra UI from March 2023, Chakra's biggest complaint currently is the CSS-in-JS setup that is causing our FOUC. Their solution is to switch to a styleless component library called Ark & a program that will extract & compile the styles at build time called Panda CSS. Supposedly the transition will begin in earnest once Panda CSS is released for production. |
What happened?
When pages first load there is a period of up to several seconds when the content of the page is only partially styled. Specifically the Chakra global styles are loaded, but the component styles aren't loaded until the page renders on the client.
What did you expect to happen?
The page to be fully styled on load.
How can we reproduce the problem (as minimally as possible)?
Load the page. To make it particularly obvious turn on network throttling in network developers tools.
The text was updated successfully, but these errors were encountered: