New: Cookbooks and AI ExplanationsStep-by-Step recipes to solve problems connected to Roadmaps and Cheat Sheets. Need more details? Use AI buttons for structured and simple explanations with concrete examples throughout the whole platform.Take a look
The form submits, the database updates, and the button just sits there looking exactly like it did before anyone clicked it.
What you'll have at the end
A form with useActionState-driven error text and a useFormStatus pending state that both update the moment the action resolves
You need
A Server Action already wired to a form's action prop, writing a real row to a database and returning nothing, with no code anywhere on the page telling the person who just submitted whether it worked.
Not covered
Whether this same mutation should also clear a stale list somewhere else on the page; that is a caching problem, left for a different recipe to solve.
Checked 25 Aug 2026
Part of the NextJS cookbook