CSS-in-JS is Dead. Long Live CSS Modules and Vanilla Extract
CSS-in-JS is Dead. Long Live CSS Modules and Vanilla Extract By Wilson Xu — 2,600 words The CSS-in-JS era is over. Not dead like Flash — dead like jQuery: still running on millions of sites, but no...

Source: DEV Community
CSS-in-JS is Dead. Long Live CSS Modules and Vanilla Extract By Wilson Xu — 2,600 words The CSS-in-JS era is over. Not dead like Flash — dead like jQuery: still running on millions of sites, but no longer the answer to new projects. Styled-components and Emotion served us well. They solved real problems. But in 2026, with React Server Components, streaming SSR, and edge runtimes, their runtime overhead and server-component incompatibility make them the wrong default. This isn't a hot take. It's what the benchmarks and the migration notes from teams at Vercel, Shopify, and Linear say plainly: runtime CSS-in-JS doesn't belong in the critical path of a modern React app. Here's what to use instead, how to migrate, and what the tradeoffs actually are. Why Runtime CSS-in-JS Struggles in 2026 The core problem: runtime CSS-in-JS generates styles in JavaScript, at render time, in the browser. This means: No Server Components — styled-components requires a React context to inject styles. Server