Hey guys,

Welcome to another edition of Import React by Cosden Solutions!

This week has a theme, whether I planned it or not: legacy code. Nearly all of us have opened a repo we didn't write and felt our soul briefly leave our body 😅.

Let's get into it.

Meta, TikTok, Klaviyo, GA4. Four logins, four answers. Viktor pulls them into one Slack thread, so your whole stack reports in a single brief instead of four open tabs. Get Started for Free

⚡️ The Latest In React

🆘 Backend dev drowning in a 5-year-old React codebase
Possibly the most relatable r/reactjs thread this month: a backend dev gets handed a sprawling 5-year-old React app and asks how you're even supposed to start. Anyone who's inherited a frontend they didn't write is going to feel this one in their bones, go read it and add your own war story.

🎮 How Medal cut its renderer bundle from 40MB to 2.7MB
Medal's frontend team was stuck in the classic legacy deadlock, old components blocked dependency upgrades, and every new feature piled more code onto the heap. Rick Zhang walks through digging out: a move to a PNPM monorepo, going all-in on Vite then Rolldown, ruthlessly deleting dead code, and swapping ancient components for Tailwind + Shadcn. The renderer bundle went from 40MB+ down to 2.7MB, and they can now stand up whole pages in a day, told with an absurd number of League of Legends metaphors.

🧩 Prop-driven vs composition-based design systems
A sharp r/reactjs debate on how to structure a component library: MUI/Shadcn-style composition (pass children) vs Ant-Design-style props. The thread settles on a nuanced middle, composition for small primitives, configuration for the big boilerplate-heavy components, plus a tidy pattern for wrapping Radix so every dropdown in your app stays consistent. Required reading if you build or maintain your own design system.

🎛️ The Goldilocks customizable select height
Now that fully-stylable <select> is nearly here, Jake Archibald tackles a deceptively hard problem: sizing the dropdown picker so it's never too tall, never too short, and never crashes into the viewport edge. He works through the CSS (and admits he needed help cracking it), landing on a copy-pasteable block built from calc-size() and position-try-fallbacks. A preview of the CSS we'll all be writing soon.

🦀 Rolldown pulled its Rust React Compiler integration
Rolldown and Vite backed out a native Rust React Compiler integration because it grew the binary by ~5MB (a 17% jump), and since Vite is framework-agnostic, every non-React user would pay for it. Evan You's line: if React gets 5MB, why not Vue, Svelte, Solid? Meanwhile Rspack shipped the same Rust compiler as a headline feature (benchmarked 7–13x faster than Babel). A clear window into the Rust-tooling tradeoffs the whole ecosystem is wrestling with.

Quick Links

🧠 Deep Dives & General Programming

🧪 The React testing questions that trip up engineers
A great set of interview-style questions on testing React: the test that can never fail, what "testing implementation details" really means, testing a debounced input with fake timers, and mocking IntersectionObserver. Solid interview prep — or an uncomfortable mirror for your own test suite.

🕵️ The git commands I run before reading any code
Five git log one-liners that X-ray a new codebase before you open a single file: churn hotspots, bus factor, where bugs cluster, and whether the team is quietly firefighting. The perfect companion to that drowning thread up top.

🌊 Every hydration and rendering strategy, explained
A genuinely thorough tour — SSG, CSR, SSR, streaming, islands, RSC, TanStack Start, fine-grained reactivity (Solid/Svelte), and resumability (Qwik) — and, crucially, how to actually choose between them. If the rendering-strategy alphabet soup has ever confused you, this is the map.

🐌 The slowest possible way to add up an array
A wonderfully nerdy memory deep dive: the author builds an access pattern that sums integers >30% slower than fully random access by deliberately thrashing the cache, prefetcher, TLB, and even DRAM row buffers. You'll come away understanding your CPU a lot better.

🔒 CORS: what is it actually protecting?
The explainer that finally makes it click: CORS is a browser rule, not a server one (curl hits the same endpoint just fine), what preflight actually does, and why it is not CSRF protection. If you've ever allow-listed an origin without fully knowing why, read this.

See you next week,

Darius Cosden