
Next.js App Router vs Pages Router
An in-depth comparison of Next.js App Router and Pages Router. Understand the differences, benefits of React Server Components, and migration strategies.
The Evolution of Next.js
With the release of Next.js 13, Vercel introduced the App Router (/app), a paradigm shift from the traditional Pages Router (/pages). The App Router brings React Server Components (RSC) to the forefront, enabling faster loads and smaller JavaScript bundles.
Key Differences
- Routing: Pages Router uses file-based routing where every file is a route. App Router uses folder-based routing, where only folders containing a
page.tsxbecome public routes. - Data Fetching: App Router drops
getServerSidePropsandgetStaticPropsin favor of nativeasync/awaitinside Server Components. - Layouts: App Router introduces nested layouts (
layout.tsx) which preserve state across navigations and do not re-render unnecessarily.
React Server Components (RSC)
By default, all components in the App Router are Server Components. They render entirely on the server, sending only HTML to the client. If you need client-side interactivity (like useState or onClick), you must explicitly add the "use client" directive at the top of your file.
When to Migrate?
If you are starting a new project, start with the App Router. If you have a large, existing Pages Router app, Vercel allows incremental adoption. You can run both the /pages and /app directories simultaneously in the same project.
Nimesh Regmi
Freelance Flutter, Django, and Next.js developer based in Kathmandu, Nepal. I build production-ready mobile apps, REST APIs, and full-stack platforms for startups and businesses worldwide.
Looking for a Developer?
I build high-performance mobile apps and web platforms. Available for freelance projects.
View My Services →