16 entries · 15-question quiz
Next.js: The React Framework (App Router)
React ↔ Angular reference. Next.js examples use Next.js 16 (App Router) + TypeScript. Angular examples use modern, out-of-the-box Angular (standalone components, signals, inject(), @if/@for) with @angular/ssr for server rendering. API calls live in a service class.
Coverage source: nextjs-api-reference.md. Advanced APIs not taught here (parallel and intercepting routes, instrumentation, MDX, after, draft mode) stay Coming soon.
Test yourself
15 questions
- 1What a Framework Adds to React
Next.js is a framework built on React. React renders UI; Next.js adds routing, server rendering, data fetching, caching, and a build system.
- 2Server and Client Components
In the App Router, every component is a Server Component by default. Adding
'use client'at the top of a file makes it, and everything it imports, a Client Component. - 3File-Based Routing: Pages and Layouts
Folders inside
app/define URL segments. Apage.tsxmakes a segment reachable; alayout.tsxwraps it and every child segment. - 4Dynamic Routes and Params
A folder named in square brackets (
[slug]) matches any value in that URL segment and passes it to the page asparams. - 5Navigation
<Link>navigates on the client without a full page reload and prefetches the target route.useRouter()navigates from code. - 6Fetching Data on the Server
A Server Component can be
asyncandawaitdata directly: from a database, an internal function, orfetch. - 7Loading UI and Streaming
loading.tsxshows instant fallback UI while a route's data loads.<Suspense>does the same for any part of a page, and the server streams each part as it's ready. - 8Errors and Not Found
error.tsxcatches errors thrown while rendering a segment and shows fallback UI.not-found.tsxrenders whennotFound()is called or no route matches. - 9Server Actions and Forms
A Server Action is an
asyncfunction marked'use server'that runs on the server but can be called from a form or a Client Component, like a built-in API endpoint. - 10Caching and Revalidation
With
cacheComponentsenabled,'use cache'caches the result of a function or component.cacheLifesets how long;cacheTaglabels it so it can be refreshed on demand. - 11Rendering Strategies: Static, Dynamic, and Export
A route is static (rendered at build time) unless it reads request data or uncached data, which makes it dynamic (rendered per request).
generateStaticParamsprerenders dynamic routes;output: 'export'produces a plain static site. - 12Route Handlers
A
route.tsfile exports functions named after HTTP methods (GET,POST, …) and turns a segment into an API endpoint using the WebRequestandResponseAPIs. - 13Redirects and Proxy
redirect()sends the user elsewhere during rendering or in a Server Action.proxy.ts(calledmiddleware.tsbefore Next.js 16) runs before a request reaches a route and can redirect, rewrite, or set headers. - 14Metadata and SEO
A page or layout exports a
metadataobject, or an asyncgenerateMetadatafunction, to set the<title>, description, Open Graph tags, and more. - 15Images and Fonts
next/imageresizes, lazy-loads, and serves modern image formats automatically.next/fontself-hosts fonts at build time with no layout shift. - 16Summary