Skip to content

Commit 6907d6c

Browse files
committed
Clarify pending status and link form reset guidance
1 parent d8ff8dd commit 6907d6c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ In the above example, `Submit` uses this information to disable `<button>` press
5454

5555
A `status` object with the following properties:
5656

57-
* `pending`: A boolean. If `true`, this means the parent `<form>` is pending submission. Otherwise, `false`. `pending` is also `true` while a Transition started from a `submit` event handler is pending, as long as the handler calls `event.preventDefault()` and starts the Transition in the same event.
57+
* `pending`: A boolean. If `true`, the parent `<form>` is pending submission, either through its `action` prop or through an `onSubmit` handler that calls `event.preventDefault()` and starts a Transition in the same event. Otherwise, `false`.
5858

5959
* `data`: An object implementing the [`FormData interface`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) that contains the data the parent `<form>` is submitting. If there is no active submission or no parent `<form>`, it will be `null`.
6060

@@ -168,7 +168,7 @@ export async function submitForm(formData) {
168168

169169
</Sandpack>
170170

171-
Unlike a function passed to the `<form action>` prop, handling submission this way does not automatically reset the form.
171+
Unlike a function passed to the `<form action>` prop, handling submission this way [does not automatically reset the form](/reference/react-dom/components/form#other-ways-to-control-form-resets).
172172

173173

174174
<Pitfall>

0 commit comments

Comments
 (0)