How To Increase CSS-in-JS Performance by 175x

I like the convenience of CSS-in-JS especially being able to co-locate styling but I’m not convinced on a few of things:

  1. That hashed classes are a “must have” instead of namespaced classes, and could even be annoying in 3rd party components.
  2. That using logic in your CSS is necessarily better or more readable, and is also a performance killer (more on that below).
  3. That it’s a good idea to add 25-40kb of minified JavaScript to your 10kb NPM component.

At first you go on your merry way and don’t notice any performance problems with these “blazing fast” runtime CSS solutions. That is until you put a bunch of them on one page in Storybook.

Default image
Lingaraj Senapati
Hey There! I am Lingaraj Senapati, the Co-founder of My skills are Freelance, Web Developer & Designer, Corporate Trainer, Digital Marketer & Youtuber.
Articles: 145

Newsletter Updates

Enter your email address below to subscribe to our newsletter

Leave a Reply

15 − four =

Physical Address

Patia, Bhubaneswar, khordha, 751024, Odisha, India