Skip to content

Commit 8814637

Browse files
committed
docs: document useFormStatus with preventDefault and startTransition (#8682)
1 parent ae5e480 commit 8814637

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/content/reference/react-dom/hooks/useFormStatus.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ A `status` object with the following properties:
7272

7373
## Usage {/*usage*/}
7474

75-
### Display a pending state during form submission {/*display-a-pending-state-during-form-submission*/}
75+
### Display a pending state during form submission {/*display-a-pending-state-during-form-submission*/}`useFormStatus` will also report `pending: true` if a form submission handler calls `event.preventDefault()` and starts a Transition using `startTransition`. This is useful when handling custom form submissions without the `action` prop.
7676
To display a pending state while a form is submitting, you can call the `useFormStatus` Hook in a component rendered in a `<form>` and read the `pending` property returned.
7777

7878
Here, we use the `pending` property to indicate the form is submitting.

0 commit comments

Comments
 (0)