Skip to content
Latchkey

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

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →