Server Actions are async functions that run on the server and can be called straight from your components. Mark one with the "use server" directive, pass it to a form's action prop, and Next.js handles the request for you: no API route, no manual fetch, no JSON wiring. Forms that call Server Actions from Server Components can even work before JavaScript has loaded.
This module covers the full form workflow: reading FormData, validating input on the server with Zod, returning errors to the UI with useActionState (formerly useFormState), showing a pending state with useFormStatus, and refreshing cached data after a mutation with revalidatePath.
Watch the lessons in order, then continue on to Styling & Optimization.
An in-depth tutorial on handling form submissions, mutating data, and running logic directly on the server with Server Actions.
Walks through setting up form validation in a Next.js app with Server Actions.
Combines Server Actions, the useFormState hook and Zod validation when submitting forms in Next.js.
Robin Wieruch's written tutorial on forms in the App Router: useFormStatus, useActionState, revalidatePath, Zod validation, field-level errors and progressive enhancement.
Article