Show HN: Forked styled-components with optimizations (40% faster for Linear) https://ift.tt/wTCpdrv

Show HN: Forked styled-components with optimizations (40% faster for Linear) Hey HN! We forked styled-components after it entered maintenance mode because our production apps (and many others) can't migrate overnight. Backstory: We submitted PR #4332 ( https://ift.tt/A6tMZor... ) to styled-components in July 2024 with React 18 optimizations. When maintenance mode was announced, we turned that PR into this fork. What we fixed: - Added React 18's useInsertionEffect - Rewrote streaming SSR for React 19 - Replaced ES5 output with modern JS - Optimized array operations with native flatMap - Fixed Next.js App Router to work without 50+ lines of boilerplate Linear tested it and saw 40% faster initial renders with zero code changes. How to try it: npm install @sanity/styled-components@npm:styled-components Or for React 19: npm install @sanity/css-in-js@npm:styled-components Benchmark tool to test yourself: https://ift.tt/WrJbgFH We named it "last-resort" because that's what it is. We're not trying to maintain styled-components long-term - we're actually migrating to vanilla-extract ourselves. This is just a performance bridge while teams migrate properly. The React team recommends moving away from runtime CSS injection. We agree. But migrations take time, and production apps need to ship today. https://ift.tt/zWkEwiv September 12, 2025 at 12:07AM

Komentar

Postingan populer dari blog ini

Show HN: Guish – A GUI for constructing and executing Unix pipelines https://ift.tt/HrXz5ub

Twin Peaks for All: Survey Results

History in Motion: New Photos from the 1960s to 1980s Now Online