How to Create a Next.js App with create-next-app
Create a new Next.js app with the create-next-app CLI, understand its prompts, and start the dev server in a few minutes.
Full-stack React framework
Create a new Next.js app with the create-next-app CLI, understand its prompts, and start the dev server in a few minutes.
Next.js turns folders inside app into URLs. Learn how nesting, page files, and layouts combine to build your app's routes.
A catch-all route matches many URL segments with one folder. Learn the difference between catch-all and optional catch-all syntax and when each fits.
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.
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.
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.
With Cache Components enabled, navigating away from a page and back no longer resets its state. Learn how React's Activity component makes that happen.
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.