July 20, 2024
Next.js vs Create React App: Why We Chose Next.js
We rebuilt our dashboard from Create React App to Next.js. Here's why.
What Next.js Gives Us
Server-Side Rendering: Better SEO, faster initial load. Matters for logged-out pages.
File-Based Routing: No more React Router config. Files = routes. Simple.
API Routes: Build backend endpoints right in the Next.js app. Less context switching.
Image Optimization: Automatic lazy loading, WebP conversion, responsive images.
Better DX: Fast Refresh, built-in TypeScript support, zero config.
The Migration
Took about a week. Routing needed the most changes. Everything else was straightforward.
The Results
- Lighthouse score: 65 → 95
- Initial load time: 3.2s → 1.1s
- Developer happiness: Much higher
When to Use CRA
If you're building a pure SPA with no SEO needs, CRA is fine. For everything else, Next.js is worth it.