# useFormStatus()

> The `useFormStatus()` hook in React DOM provides status information about the last form submission.

## Why does useFormStatus always return pending false?

The hook from React DOM that returns the status of the parent `<form>`, including the 'pending' flag and submitted data. Must be called from a component rendered inside the form, for example from a submit button.

- Topic: Hooks
- Type: hook

## Example

Wrong:

```jsx
function Form() {
  const { pending } = useFormStatus();
  return (
    <form action={save}>
      <button disabled={pending}>Save</button>
    </form>
  );
}
```

Right:

```jsx
function SubmitButton() {
  const { pending } = useFormStatus();
  return <button disabled={pending}>Save</button>;
}
function Form() {
  return <form action={save}><SubmitButton /></form>;
}
```

`useFormStatus` reads the status of the parent `<form>`, so it must be called in a component rendered inside it.

## Common mistakes

- Calling it in the same component that returns the `<form>`, so `pending` is always `false`.

## Key points

- `useFormStatus` is imported from 'react-dom', not 'react'.
- It is called in a component rendered inside the `<form>`, not in the component that renders the form.
- The form submits through the `action` prop, since `onSubmit` handlers do not update the status.

## Interview questions

### Can useFormStatus read the data being submitted?

Yes. Besides `pending` it returns `data` (the `FormData`), `method` and `action` of the parent form while it submits.

### useFormStatus vs useActionState: which do I need?

`useActionState` holds the result of an action. `useFormStatus` only tells a child component that its parent form is submitting.

## Related cards

- [useActionState()](https://wonderium.dev/react/use-action-state.md)
- [Actions](https://wonderium.dev/react/actions.md)
- [useOptimistic()](https://wonderium.dev/react/use-optimistic.md)
- [`<form>`](https://wonderium.dev/html/form.md)
- [Server Actions](https://wonderium.dev/react/server-actions.md)

---

- Level: [React](https://wonderium.dev/react.md)
- HTML version: https://wonderium.dev/react/use-form-status
- Last updated: 2026-11-25
