Next.js & App Router (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)
What are the key differences between the App Router (`app/`) and the legacy Pages Router (`pages/`)?
junior LevelRouting
In Simple Words:
| Feature | Legacy Pages Router (pages/) | Modern App Router (app/) |
|---|---|---|
| Component Model | Everything is a Client Component | Components are Server Components by default |
| Data Fetching | getServerSideProps, getStaticProps | Native async/await in components & fetch() |
| Layouts | Custom _app.js and _document.js | Nested, co-located layout.tsx files |
| Streaming & Loading | Manual spinner state | Native <Suspense> and loading.tsx |
| Mutations | Custom API routes (pages/api/*) | First-class Server Actions ('use server') |
| Bundle Size | Larger (React runtime on client) | Smaller (Server components ship 0KB JS) |