Skip to content

Commit 1a0e536

Browse files
committed
Link form submission and Transition references
1 parent f6a767b commit 1a0e536

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
@@ -116,7 +116,7 @@ export async function submitForm(query) {
116116

117117
### Display a pending state with an `onSubmit` handler {/*display-a-pending-state-with-an-onsubmit-handler*/}
118118

119-
If you need to handle form submission in an `onSubmit` event handler instead of passing a function to the `<form action>` prop, call `event.preventDefault()` and start a Transition in the same event handler. A component inside the form can then use `useFormStatus` to read the pending state while the Action is running.
119+
If you need to handle form submission in an `onSubmit` event handler instead of passing a function to the [`<form action>` prop](/reference/react-dom/components/form#handle-form-submission-with-an-action-prop), call [`event.preventDefault()`](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault) and [start a Transition](/reference/react/startTransition) in the same event handler. A component inside the form can then use `useFormStatus` to read the pending state while the Action is running.
120120

121121
<Sandpack>
122122

0 commit comments

Comments
 (0)