Skip to content

docs: explain useFormStatus with custom form actions - #8683

Merged
aurorascharff merged 6 commits into
reactjs:mainfrom
Felix-ming:docs/useformstatus-transition-pending
Nov 5, 2026
Merged

aurorascharff merged 6 commits into
reactjs:mainfrom
Felix-ming:docs/useformstatus-transition-pending

Conversation

@Felix-ming

Copy link
Copy Markdown
Contributor

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! 🙌

@aurorascharff

Copy link
Copy Markdown
Collaborator

Thanks for your contribution!! ❤️ Nice example!

@aurorascharff
aurorascharff merged commit 2e6dca1 into reactjs:main Nov 5, 2026
5 checks passed

This branch was successfully deployed

1 active deployment
Preview — 1df25ec9 Deployed Nov 5, 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

2 participants