This is an introduction to CSSinJS that doesn't require any JavaScript knowledge, just a basic CSS.
It shows how to convert a very basic button written in Sass (SCSS) to CSSinJS without using any CSS in JS libraries. It uses native JavaScript variables and template literals.
I think it is a specific issue with your code. If you really inject styles first, html second, you would not see the FOUC. Feel free to post a reproducible example on codesandbox.
Best, Oleg
I'm still not sure how to use it in react, can you tell me how to do that part in react: document.head.appendChild( document.createElement('style') ).textContent = button
basically I don't know how to connect it to react cra app
This course so far is about foundational knowledge, not React specific.
@damianjnc for something specific to React you could refer to https://github.com/emotion-js/emotion