Last Minute Notes

Next.js

A beginner to advanced Next.js library: App Router fundamentals, rendering strategies and React Server Components, routing and navigation, data fetching and the caching layers, Server Actions and Route Handlers, authentication and proxy, performance, testing, deployment, and an interview playbook.

Start here for Next.js prep, from "what is the difference between page.tsx and layout.tsx" to "why is this page still showing stale data after the mutation". Each page teaches the framework the way interviews probe it: what runs on the server, what ships to the browser, what is cached where, and how you would prove it. Everything reflects the current platform: the App Router is the default, Server Components are the default component type, Turbopack is the default bundler, params and cookies() are async, proxy.ts replaces middleware.ts, and Cache Components with "use cache" is the explicit caching model.

  1. 01
    Next.js Fundamentals

    Next.js from zero: what it is and how it differs from plain React, Remix, and Astro, project setup and anatomy, App Router file conventions, layouts and templates, Link and navigation hooks, styling, fonts and images, metadata and SEO, environment variables, and the mistakes SPA developers make first.

  2. 02
    Rendering and Server Components

    How Next.js renders: CSR, SSR, SSG, ISR, and streaming compared, static vs dynamic rendering and what triggers each, React Server Components and the RSC payload, the use client boundary, composition rules, serialization limits, hydration and its errors, Suspense and loading UI, and Partial Prerendering.

  3. 03
    Routing and Navigation

    Next.js App Router routing in depth: dynamic, catch-all, and optional catch-all segments, async params and searchParams, route groups and private folders, generateStaticParams, loading, error, and not-found handling, parallel and intercepting routes for modals, redirects and rewrites, internationalization, and client navigation behavior.

  4. 04
    Data Fetching and Caching

    Data in Next.js: fetching in Server Components, parallel vs sequential requests and waterfalls, request memoization and React cache, the four classic caches (Request Memoization, Data Cache, Full Route Cache, Router Cache), Cache Components with use cache, cacheLife, cacheTag, revalidateTag, updateTag, and refresh, ISR, client-side data libraries, and debugging stale data.

  5. 05
    Server Actions and Route Handlers

    Mutations and APIs in Next.js: Server Actions with forms and progressive enhancement, useActionState, useFormStatus, useOptimistic, validation with Zod, returning errors, revalidation after mutations, file uploads, Route Handlers for REST endpoints and webhooks, streaming responses, CORS, and when to use which.

  6. 06
    Auth, Security, and Proxy

    Authentication and security in Next.js: proxy.ts (formerly middleware) and what it should and should not do, session cookies vs JWTs, the Data Access Layer pattern, authorization at every boundary, Auth.js and other libraries, OAuth flows, CSRF, security headers and CSP with nonces, server-only code, secrets, rate limiting, and a production checklist.

  7. 07
    Performance and Optimization

    Next.js performance: Core Web Vitals and how each is hurt or helped, measuring with Lighthouse, Web Vitals, and the bundle analyzer, next/image, next/font, next/script, bundle size and dynamic imports, Server Component wins, streaming and Partial Prerendering, caching layers, React Compiler, Turbopack, and a debugging playbook.

  8. 08
    Testing, Deployment, and Operations

    Shipping Next.js: the testing pyramid for the App Router (Vitest, React Testing Library, Playwright, mocking), CI pipelines, deployment targets (Vercel, Node server, Docker standalone, static export, adapters), environment configuration, multi-instance caching and cacheHandler, observability with instrumentation and OpenTelemetry, logging, and upgrades.

  9. 09
    Next.js Interview Playbook

    Next.js interview rehearsal: what each level is expected to know, a 50-question bank with strong-answer checklists, predict-the-behavior puzzles, machine coding tasks, system design prompts, production scenarios, cheat sheets, common mistakes, and a 7-day study plan.

Reading Path

Pick Your Level

You areRead in this order
A React SPA developer new to Next.jsFundamentals, Routing and Navigation, Rendering and Server Components
Preparing for a mid-level roleAdd Data Fetching and Caching, Server Actions and Route Handlers, and Performance
Preparing for senior or platform rolesAdd Auth, Security, and Proxy and Testing, Deployment, and Operations
One week leftThe Interview Playbook study plan
  • React covers hooks, rendering, and patterns that apply unchanged inside Client Components.
  • JavaScript and TypeScript cover the language your app is written in.
  • Redux covers Redux Toolkit and RTK Query, which live in Client Components only.
  • Backend covers HTTP, auth, caching, and queues behind Route Handlers and Server Actions.
  • Frontend System Design covers the client architecture framework used in design rounds.

On this page