Calling server-side code directly from a component, without hand-building an API route.
A Server Action is a function marked with 'use server' that runs exclusively on the server, but can be called directly from a component — including a client component — as if it were a normal local function, with no manually written fetch call or API endpoint. Next.js handles the network request transparently underneath.
Server Actions integrate directly with forms — passed to a form's action prop, they keep working even before client-side JavaScript has hydrated, thanks to progressive enhancement — and with cache invalidation via revalidatePath and revalidateTag, which is how a mutation can immediately reflect in data that was previously cached. Because the function runs on the server, it's easy to assume it's automatically safe from leaking data — but arguments and closed-over values can end up serialized and sent to the client in certain cases, so a Server Action still needs the same care around what it exposes.
What you'll walk away knowing