ISR with Cache Components: Prerendering a Subset of Routes
How Cache Components prerender the routes you list in generateStaticParams, serve an App Shell for the rest, and upgrade unknown URLs after their first visit.
Full-stack React framework
How Cache Components prerender the routes you list in generateStaticParams, serve an App Shell for the rest, and upgrade unknown URLs after their first visit.
How the dynamic APIs cookies(), headers(), and searchParams turn a route dynamic, and how Cache Components change that into per-boundary streaming.
How the use server directive marks files and functions to run on the server, and the rules for calling them from Client Components.
A step-by-step pattern for mutating data with a Server Action: read FormData, validate on the server, save, and refresh the page.
What NextRequest and NextResponse add on top of the Web Request and Response APIs, and when to use each helper in a route handler.
What changes when a pages/api handler becomes an app route file, a mapping table for every request and response helper, and the behavior differences to expect.
Next.js 16 renamed the middleware file convention to proxy. Here is the new file, the new function name, the Node.js runtime rule, and the codemod that migrates an existing project.
How the matcher option in a Next.js proxy file limits which request paths run your interception code, including path patterns, negative lookaheads, and header or cookie conditions.
A redirect sends the browser to a new URL and changes the address bar. A rewrite serves different content under the same URL. Here is how each behaves in Next.js and when to pick one.
How to declare redirects in a typed Next.js config file, including permanent versus temporary status codes, path parameters, conditional matching, and how to verify the result.
How to map a path in your Next.js app to another route or to an external service with rewrites, including the three rewrite phases, query behavior, and the destination rule that prevents SSRF.
Both functions stop rendering and send the visitor somewhere else. The difference is the status code, how long clients remember it, and what that means when the route is prerendered.