Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

168
Vistas
Next js static export unstyled html flash. [FOUC]

I am working with next.js and everything seems to be fine when I am using app with npm run dev.

But when I am exporting my next.js app to a static files with command npm run build and trying to open my project for part of the second the screen is unstyled, this cause verry bad user experience.

I know this is called FOUC but how to avoid it on next.js static export?

P.S I am using styled-components library, not sure if that affecting the final result.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Long shot that this is a fix for anyone else, but I saw this behavior when I mistakenly wrapped the entire page contents inside the head tag. Heh, oops.

So don't override Document with something like this like I did, make sure to close that head tag sooner:

<Html lang="en">
    <Head>
        <body>
            <Main />
            <NextScript />
        </body>
    </Head>
</Html>
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda