Routing in Next.js

Next.js uses a file-based routing system where folders define routes.

Basic Example

app/
 ├── page.js        → /
 ├── blog/
 │   └── page.js    → /blog

Real World Use Case

Large applications use nested routes to separate dashboards, blogs, and documentation sections.