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

  1. 1
    What 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.

  2. 2
    Server 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.

  3. 3
    File-Based Routing: Pages and Layouts

    Folders inside app/ define URL segments. A page.tsx makes a segment reachable; a layout.tsx wraps it and every child segment.

  4. 4
    Dynamic Routes and Params

    A folder named in square brackets ([slug]) matches any value in that URL segment and passes it to the page as params.

  5. 5
    Navigation

    <Link> navigates on the client without a full page reload and prefetches the target route. useRouter() navigates from code.

  6. 6
    Fetching Data on the Server

    A Server Component can be async and await data directly: from a database, an internal function, or fetch.

  7. 7
    Loading UI and Streaming

    loading.tsx shows 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.

  8. 8
    Errors and Not Found

    error.tsx catches errors thrown while rendering a segment and shows fallback UI. not-found.tsx renders when notFound() is called or no route matches.

  9. 9
    Server Actions and Forms

    A Server Action is an async function 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.

  10. 10
    Caching and Revalidation

    With cacheComponents enabled, 'use cache' caches the result of a function or component. cacheLife sets how long; cacheTag labels it so it can be refreshed on demand.

  11. 11
    Rendering 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). generateStaticParams prerenders dynamic routes; output: 'export' produces a plain static site.

  12. 12
    Route Handlers

    A route.ts file exports functions named after HTTP methods (GET, POST, …) and turns a segment into an API endpoint using the Web Request and Response APIs.

  13. 13
    Redirects and Proxy

    redirect() sends the user elsewhere during rendering or in a Server Action. proxy.ts (called middleware.ts before Next.js 16) runs before a request reaches a route and can redirect, rewrite, or set headers.

  14. 14
    Metadata and SEO

    A page or layout exports a metadata object, or an async generateMetadata function, to set the <title>, description, Open Graph tags, and more.

  15. 15
    Images and Fonts

    next/image resizes, lazy-loads, and serves modern image formats automatically. next/font self-hosts fonts at build time with no layout shift.

  16. 16
    Summary