Skip to content

docs: explain useFormStatus with custom form actions - #8683

Open
Felix-ming wants to merge 1 commit into
reactjs:mainfrom
Felix-ming:docs/useformstatus-transition-pending
Open

Felix-ming wants to merge 1 commit into
reactjs:mainfrom
Felix-ming:docs/useformstatus-transition-pending

Conversation

@Felix-ming

Copy link
Copy Markdown

Closes #8682.

Document when useFormStatus().pending is set for a preventDefault() submit handler that starts a Transition in the same event, and add a runnable example for a custom form action. The example also notes that this pattern does not reset the form automatically.

Validation: yarn check-all and git diff --check pass locally. The initial draft was prepared with AI assistance and reviewed against the React DOM tests and issue details.

Closes reactjs#8682.

Document when `useFormStatus().pending` is set for a `preventDefault()` submit handler that starts a Transition in the same event, and add a runnable example for a custom form action. The example also notes that this pattern does not reset the form automatically.

Validation: `yarn check-all` and `git diff --check` pass locally. The initial draft was prepared with AI assistance and reviewed against the React DOM tests and issue details.
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

Size changes

Details

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

This branch was successfully deployed

1 active deployment
Preview — 09460260 Deployed Oct 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Suggestion]: Document that useFormStatus works with a preventDefault-ed onSubmit + startTransition

1 participant