News for hackers. Stuff that matters.
Re:Why I Write CSS in JavaScript by davnicwil on Monday February 18, 2019 @09:53AM (#19190972)
React apps have to be deliberately engineered to work without JS at all, via server rendering. Assuming that's done though, the CSS in JS can just be server rendered too.

It's rather easy too if you're using a (great) library like styled components - this functionality is built in and just works with a couple of extra lines of code.

The deeper question here is will the app work at all without JS. That's quite hard to achieve (every client side interaction must have a server rendered equivalent accessible via a url or url params, essentially) but the CSS part is easy.

There are no comments on this comment yet.