How File-Based Routing Works in the Next.js App Router
Next.js turns folders inside app into URLs. Learn how nesting, page files, and layouts combine to build your app's routes.
Full-stack React framework
Next.js turns folders inside app into URLs. Learn how nesting, page files, and layouts combine to build your app's routes.
params and searchParams both come from the URL but capture different parts of it. Learn the difference and how to read each one correctly.
Parallel routes render more than one page in the same layout at once, each with its own loading and error state. Learn the @slot convention.
Intercepting routes load one route inside the current layout while masking the URL, which is what lets a photo open as a modal instead of a new page.
default.js fills in a parallel route slot when Next.js cannot recover its active state after a full page load. Learn when it's required and what happens without one.
Layouts cannot pass data to the pages they wrap, and pages cannot pass data up to a layout. Learn the real patterns for sharing data between them.
The Link component moves readers between pages without a full reload. Learn its props, its prefetch behavior, and when to reach for it over a plain anchor.
Clicking a Next.js Link does not reload the page. See the steps between the click and the new content appearing, and why it feels instant.
useRouter is a client-side hook for event handlers, and redirect is a server-side function that interrupts rendering. Learn which one fits which situation.
useSelectedLayoutSegment reads which route segment is active one level below a layout, which makes it a natural fit for highlighting an active nav link.
useLinkStatus tells a component inside a Link whether that navigation is still pending, which is how you show a loading indicator on a slow link.
Pass props from a Server Component to a Client Component by keeping every value serializable. See a working example, plus how to stream a Promise prop with the use API.