Next.js

Full-stack React framework

167 tutorials
12 of 167 tutorials
Aug 24, 2026· 7 min read

The `use server` Directive Explained

How the use server directive marks files and functions to run on the server, and the rules for calling them from Client Components.

nextjsServer Actionsserver functions
Aug 24, 2026· 7 min read

How to Mutate Data with a Server Action

A step-by-step pattern for mutating data with a Server Action: read FormData, validate on the server, save, and refresh the page.

nextjsMutationsServer Actions
Aug 24, 2026· 6 min read

`NextRequest` and `NextResponse` Explained

What NextRequest and NextResponse add on top of the Web Request and Response APIs, and when to use each helper in a route handler.

Route Handlersnextjsrequest response
Aug 24, 2026· 7 min read

Rewrites vs Redirects in Next.js: The Real Difference

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.

rewritesnextjsRedirects
Aug 24, 2026· 8 min read

Configuring `redirects` in `next.config.ts`

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.

ConfigurationnextjsRedirects
Aug 24, 2026· 9 min read

Configuring `rewrites` and Proxying to an External API

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.

rewritesnextjsAPI
Aug 24, 2026· 8 min read

`redirect` vs `permanentRedirect` in Server Components

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.

nextjsRedirectsServer Components