Form handling and mutations
| Command | Description |
|---|---|
"use server" | Directive at top of file/fn |
async function create(formData) | Action function |
<form action={create}> | Invoke from form |
| Command | Description |
|---|---|
useFormStatus() | Pending state |
useFormState(action, initial) | Handle errors/result |
revalidatePath("/path") | Refresh data |
redirect("/new-path") | Navigate after action |