Understanding Next.js Routing
Routing in Next.js App Router is file-system based. Each folder becomes a route segment, and each `page.tsx` becomes a route entry.
Core concepts
- `app/blog/page.tsx` maps to `/blog`
- `app/blog/[slug]/page.tsx` maps to `/blog/:slug`
- `layout.tsx` composes shared UI for nested segments
Why it matters
Clear route structure keeps your app scalable and makes nested UIs much easier to reason about.