mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-22 20:01:57 +00:00
Mention that uncontrolled form elements are reset by form actions (#7340)
This commit is contained in:
@@ -50,7 +50,7 @@ To create interactive controls for submitting information, render the [built-in
|
||||
|
||||
### Handle form submission on the client {/*handle-form-submission-on-the-client*/}
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
<Sandpack>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user