When Rebuilding is Better than Refactoring
We introduced a new entity to our data model and needed to update several pages. Instead of modifying each existing implementation, we rebuilt from scratch. The rebuild was faster and let us use modern patterns that would have been painful to retrofit.
The Math Has Changed
UI development costs less than it did five years ago. Better tooling, mature component libraries, and improved CSS make starting fresh viable more often.
Much of our codebase predates TypeScript. Some components still use Flow annotations. When facing large changes, scaffolding new components with current patterns beats incrementally modernizing legacy code.
Legacy code carries hidden costs: outdated dependencies, deprecated patterns, assumptions that no longer hold. Starting fresh means applying lessons learned without fighting existing architecture.
Tooling Now
Cursor replaced VS Code as my default IDE. The AI integration feels natural — contextually aware tab completion that flows with development rather than interrupting it.
I tried Warp.dev. The interface felt clunky compared to traditional terminal environments. The promise is there, but the execution is not ready yet.
React's ecosystem has matured. TanStack Query solves problems we used to handle with complex custom implementations. These improvements make rebuilding cheaper than it used to be.
When to Rebuild
Tip
Rebuild UI components and feature-specific code. Refactor critical systems and complex business logic. The threshold has shifted toward rebuilding for user interfaces.
The same tools that speed up development — AI assistance, improved frameworks, streamlined deployment — also compress time for documentation and reflection. Capture insights during development, not afterward.