Skip to content

Commit 807e7fa

Browse files
Mention that uncontrolled form elements are reset by form actions (#7340)
1 parent a4b6074 commit 807e7fa

File tree

1 file changed

+1
-1
lines changed
  • src/content/reference/react-dom/components

1 file changed

+1
-1
lines changed

src/content/reference/react-dom/components/form.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ To create interactive controls for submitting information, render the [built-in
5050

5151
### Handle form submission on the client {/*handle-form-submission-on-the-client*/}
5252

53-
Pass a function to the `action` prop of form to run the function when the form is submitted. [`formData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) will be passed to the function as an argument so you can access the data submitted by the form. This differs from the conventional [HTML action](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#action), which only accepts URLs.
53+
Pass a function to the `action` prop of form to run the function when the form is submitted. [`formData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) will be passed to the function as an argument so you can access the data submitted by the form. This differs from the conventional [HTML action](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#action), which only accepts URLs. After the `action` function succeeds, all uncontrolled field elements in the form are reset.
5454

5555
<Sandpack>
5656

0 commit comments

Comments
 (0)