Conceptual
Login

Server Actions

Functions marked with 'use server' become POST endpoints Next.js generates automatically; the client invokes them via form action props or direct calls, with arguments and return values crossing the boundary serialized. They run on the server with full backend access, integrate with useActionState and progressive enhancement (forms submit before hydration), and typically end by revalidating the caches they invalidated.

This Concept is waiting for its first lesson!

Functions marked with 'use server' become POST endpoints Next.js generates automatically; the client invokes them via form action props or direct calls, with arguments and return values crossing the boundary serialized. They run on the server with full backend access, integrate with useActionState and progressive enhancement (forms submit before hydration), and typically end by revalidating the caches they invalidated.

Are you a teacher? Sign in to start contributing.

Sign In