-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
React 19. Generate a component to avoid FOUC #39
Comments
This sounds similar to #81. But I don't understand the problem, Why would there be a FOUC today? |
There is FOUC with PigmentCSS atm because the CSS files, generated by PigmentCSS, might not be loaded at the time of the rendering the HTML which uses the styles from the loading css files. React 19 allows to wait for the generated CSS files to load |
@o-alexandrov CSS files should be loaded as blocking resources in our case, so shouldn't happen. How can we reproduce? Is this vercel/next.js#62940 that Next.js fixed recently? |
I think it applies to all bundlers, but I use I'll test once more, when #9 (global styles are possible) and #92 (theming is documented); maybe, my current FOUC issue is due to |
Yeah. FOUC should not be there when using Pigment in a project not using any runtime css-in-js. Pigment CSS offloads the css loading responsibility to the bundler. So a page's css should already have been loaded before the UI shows up. |
Yes, thank you. Let me please create a minimal example once |
Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information. |
Summary
React 19 adds support for loading stylesheets in a specified order AND ability to wait using Suspense wrapper until CSS is loaded.
Please consider to:
Examples
Motivation
Disable FOUC when needed
Search keywords: react 19 fouc suspense
The text was updated successfully, but these errors were encountered: