Context
The portfolio was using Next.js Pages Router. With the stable release of App Router and React Server Components, it was time to evaluate a migration.
Decision Drivers
- Performance: Server components reduce client bundle size
- Developer Experience: Colocation of data fetching and components
- SEO: Better metadata handling out of the box
- Future Proofing: App Router is the recommended approach going forward
Considered Options
Stay with Pages Router
- Familiar patterns
- All libraries work
- No migration effort
Migrate to App Router
- Modern React patterns
- Better performance potential
- Improved DX for many use cases
Outcome
Migrated to App Router. Key learnings:
- Server components significantly reduced JavaScript sent to client
- Data fetching at component level simplified architecture
- Streaming improved perceived performance
- Some refactoring needed for client-side interactivity