Code-splitting a production React app without anyone noticing the deploy
At IAmMaturity, I inherited a React frontend where every route pulled in the entire app on first load: dashboards, settings, admin views, all of it, whether the visitor needed it or not. The bounce rate told the real story before any profiler did: people were leaving before the page finished becoming interactive.
The fix wasn't a rewrite. It was component-level code splitting: deciding, route by route and section by section, what actually needed to exist in the initial bundle versus what could arrive the moment it was needed. React's lazy() and Suspense do the mechanical part; the actual work is figuring out where the natural seams in the app are. Admin panels a regular user never opens. Modals that only render after a click. Chart libraries that are heavy and only matter on one dashboard. Each of those became its own chunk instead of dead weight in everyone's first request.

The part that's easy to get wrong is the boundary you pick. Split too aggressively and you trade one bundle for a waterfall of small requests, each with its own round trip, and you can make things slower while feeling clever about it. Split too conservatively and you haven't actually solved anything. The rule I settled on: split at the point where a user's path through the app naturally diverges, the first click that means they're doing something most other users won't do on that visit.
Shipping it quietly mattered as much as the technique. This wasn't a big-bang deploy with a maintenance banner; it went out incrementally, route by route, so if a chunk boundary caused a regression, the blast radius was one page, not the app. Real-user monitoring, not synthetic benchmarks, was what confirmed it was working: synthetic tests don't have a spotty connection or a five-year-old phone.
The result: a measurable drop in bounce rate, no incident, no one outside the team aware anything had shipped. That's usually the actual goal of a performance fix: not a demo-able before/after, but a metric that quietly gets better and a codebase that's now structured around how the app is actually used, instead of how it was first written.