T
19

PSA: That CSS-in-JS library slowed our whole app to a crawl

It was 3 months ago at a startup in Denver. We had a design system built with a popular CSS-in-JS runtime, and everything seemed fine at first. Then we ran Lighthouse on our main dashboard page and the performance score dropped from 85 to 42. Turns out that library was injecting styles at runtime for every component, even unused ones. We spent a whole week ripping it out and moving to static CSS modules plus a custom token system. The page load time went from 4.2 seconds down to 1.8 seconds. Has anyone else run into performance problems with runtime styling tools? What did you switch to?
2 comments

Log in to join the discussion

Log In
2 Comments
gavin928
gavin9284d ago
Denver startup here too actually. We saw the same thing with our SaaS dashboard, Lighthouse went from 78 to 31 before we caught it. @avery366 I'd argue 42 is pretty bad when your users are on mobile data waiting for stuff to load. Switched to vanilla extract and our bundle dropped like 60%, totally worth the refactor.
7
avery366
avery3664d ago
Huh, 42 isn't that bad for a dashboard app though.
6