What Is a Server Action?
A server action is a function that runs on the server but can be called straight from client code, typically to perform a data mutation. The framework handles the transport so a form submission or event handler can invoke it without a hand-written API route. After it runs, related cached data can be revalidated.
Why it matters
Server actions collapse the usual client-fetch-plus-endpoint boilerplate into a single function call, keeping mutation logic on the server. They pair with revalidation to refresh the UI after a change.
Related guides
What Is a Data Mutation?A data mutation is an operation that creates, updates, or deletes server state, unlike a read, and usually re…
What Is a Revalidation Tag?A revalidation tag is a label on cached data so that, after a mutation, an app can invalidate exactly the ent…
What Is a Route Handler?A route handler is server-side code mapped to a URL path that processes a request and returns a response, use…