Reading · 10 min

How the App Router works

You are previewing a free lesson. Enrol to save progress and take quizzes.

In the App Router, folders define URLs. A page.jsx file makes a route reachable, and a layout.jsx file wraps every page beneath it and keeps its state while you navigate. Dynamic segments such as [slug] capture part of the URL.

Route groups, folders in parentheses, organise code without changing the URL.