Next.js NotesRohit’s interview study guide

Interview study guide

Next.js, built and checked.

The App Router from routing to caching, the Pages Router you'll still meet, and the version changes interviews ask about. Written for Next.js 16.4, and every example is a real app that was built with next build, with its route table checked against the page.

Chapters
14
Topics
94
Code samples
1138
Added beyond the doc
94
01Next.js FundamentalsWhat Next.js adds to React, the two routers, the files that make a route, what next dev, next build and next start each do (with every route-table symbol explained), how one request becomes HTML, an RSC payload and a hydrated page, and the version changes interviewers still mix up.6 topics02RoutingHow folders become URLs in the App Router: pages and nested layouts, links and redirects, dynamic segments, route groups, loading and not-found states, parallel and intercepting routes, templates, and what the router prefetches before you click.10 topics03Server and Client ComponentsWhat runs on the server, what ships to the browser, and the rules for the boundary between them, with the real build errors and the real RSC payload.7 topics04Data FetchingWhere data is read in the App Router, how to keep requests parallel, how streaming decides what the user sees first, what memoization deduplicates, when the browser should fetch, and how to stop private fields leaking into the page.7 topics05Caching with Cache ComponentsHow Next.js 16 decides what is computed ahead of time, what is cached and for how long, and what waits for the request; plus the older model you'll still meet in existing apps.9 topics06Rendering StrategiesWhen each page's HTML is made (at build time, per request, or both in one response) and how to see which one you got: route tables, response headers and streams measured on a running app.7 topics07Server Actions and MutationsWriting data from a Next.js app: what a Server Action really is on the wire, forms that work before JavaScript, pending and error states, optimistic UI, updating caches after a write, and keeping every action safe.7 topics08Route Handlers and ProxyHTTP endpoints in the App Router with route.ts, how they are cached, streaming and webhooks, proxy.ts (the file that was middleware.ts before Next.js 16) for redirects, rewrites and headers, and after() for work that shouldn't make the user wait.6 topics09Authentication and SecuritySessions in cookies, checks next to the data, 401/403 pages, secrets that stay secret, nonce-based CSP, and the real Next.js vulnerabilities interviewers bring up.6 topics10Optimisations and MetadataWhat next/image, next/font and next/script actually send to the browser, how metadata, Open Graph images, sitemaps and lazy loading work, and how Next.js affects LCP, CLS and INP.7 topics11Styling, Errors and ObservabilityHow CSS gets into an App Router page, what happens when something throws (on the server, in an action, in the browser), and how you find out about it in production.5 topics12Testing and DeploymentHow to test each kind of Next.js code at the level where it actually runs, and how to ship it: Vercel or your own servers, standalone Docker images, shared caches across instances, build-time versus runtime configuration, zones, monorepos and upgrades.6 topics13The Pages RouterHow Next.js worked before the App Router, and still works in a lot of production code: pages/, _app and _document, getServerSideProps, getStaticProps with ISR and fallback modes, API Routes, client-side fetching, and how each piece maps to the App Router when you migrate.6 topics14Review QuestionsRapid revision before an interview: short questions with model answers you can say out loud in a minute, each linked to the topic on this site that explains it in depth.5 topics

Added marks topics that weren’t in my original doc. Tick Learned on a topic to track what you’ve revised.

Sync progress across devices

Type the same private phrase on your Mac and your phone, and your Learned ticks follow you between them — on every study site.

The phrase never leaves this device: only a fingerprint of it is sent, and the server stores a fingerprint of that. Anyone who knows the phrase could see or change your ticks, so pick something you don’t use elsewhere.

Sync is on in this browser.

Sync ID

This ID must be the same on every device. If another device shows a different one, its phrase is different (capital letters count): tap “Turn off here” on it and type the phrase again exactly.