← All notes

Show pending form state with useFormStatus and Next.js Server Actions

Answer: useFormStatus is a Hook that gives you status information of the last form submission. In Next.js, React extends the HTML <form> element so a Server Action can be invoked with the action attribute. pending is part of the status information of the last form submission.

The Hook's return value

const { pending, data, method, action } = useFormStatus() reads the status from the parent form. pending reports the submission status. data is the submitted form data. method and action describe how the form is being submitted. Call the Hook from a component rendered inside the <form>, not from the component that owns the form element.

Server Actions on the form

The Next.js guide walks through forms with Server Actions, which are Server Functions that execute on the server and can be called from Server and Client Components to handle form submissions. When used in a form, the function automatically receives the form data. Pair pending from useFormStatus with that Action so the UI can disable a button or show a status message.

| useFormStatus | Server Actions | |---|---| | pending | Whether the last submission is still running | | data | Submitted form data | | action attribute | How Next.js invokes a Server Action from a form | | Server Functions | Run on the server to handle the submission |

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: React docs, useFormStatus; Next.js docs, How to create forms with Server Actions. CC-BY-4.0; MIT. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: React docs, useFormStatus; Next.js docs, How to create forms with Server Actions. CC-BY-4.0; MIT.

Cite this

Permanent ID: iil:note:s105zesd

iinventedlight. 2026. "Show pending form state with useFormStatus and Next.js Server Actions." iinventedlight Library, iil:note:s105zesd, version of 2026-11-19. https://iinventedlight.com/library/notes/react-useformstatus/. License: CC-BY-4.0.

@misc{iil_note_s105zesd,
  author = {{iinventedlight}},
  title = {{Show pending form state with useFormStatus and Next.js Server Actions}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-19},
  url = {https://iinventedlight.com/library/notes/react-useformstatus/},
  note = {Permanent ID iil:note:s105zesd. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/react-useformstatus.md.