css styles get applied with 1s delay (styled-components?)

786 views Asked by At

I am currently building my first website/documentation with React and help of docusaurus. But as soon as I reload the site, for about 0.5 - 1s the css styles aren't applied properly (see img below).

After I have got a hint I found out that this phenomenon is called FOUC 'Flash of unstyled Content'.

In my case it occurs only in production. See video below https://youtu.be/Zh2-1gtKOtI

It could have something to do with the styled components because the 'navbar' is the only part which has no styled components. And the navbar looks fine to me.

Codebase: https://github.com/agile-ts/documentation

enter image description here

Thank you ^^

1

There are 1 answers

1
BennoDev On

ok it has something to do with docusaurus.. https://github.com/facebook/docusaurus/issues/3236