Cory mentions two workarounds. One using the
While the approaches do prevent the FOUCE, they don’t cover the “no-JS available” scenario. Would be nice if browsers fixed this automatically by not rendering anything for a little while, to give the scripts the time to load and execute — comparable to how
font-display can let you tweak this for webfonts. When the loading fails, browsers should fall back to the original content.
💡 If we had Self-contained Components, that could potentially fix things too, no?