Skip to content

Commit 2925e1d

Browse files
committed
Standardized all Usage headings in form.md to imperative form
1 parent 7795146 commit 2925e1d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • src/content/reference/react-dom/components

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ Because you call the action manually from `onSubmit`, [`useFormStatus`](/referen
202202

203203
<DeepDive>
204204

205-
#### Resetting only some fields, or resetting on the server {/*resetting-only-some-fields*/}
205+
#### Reset only some fields, or reset on the server {/*resetting-only-some-fields*/}
206206

207207
The `onSubmit` approach keeps every uncontrolled field. When you need finer control, two other patterns are available:
208208

@@ -276,7 +276,7 @@ export async function submitForm(query) {
276276
277277
To learn more about the `useFormStatus` Hook see the [reference documentation](/reference/react-dom/hooks/useFormStatus).
278278
279-
### Optimistically updating form data {/*optimistically-updating-form-data*/}
279+
### Optimistically update form data {/*optimistically-updating-form-data*/}
280280
The `useOptimistic` Hook provides a way to optimistically update the user interface before a background operation, like a network request, completes. In the context of forms, this technique helps to make apps feel more responsive. When a user submits a form, instead of waiting for the server's response to reflect the changes, the interface is immediately updated with the expected outcome.
281281
282282
For example, when a user types a message into the form and hits the "Send" button, the `useOptimistic` Hook allows the message to immediately appear in the list with a "Sending..." label, even before the message is actually sent to a server. This "optimistic" approach gives the impression of speed and responsiveness. The form then attempts to truly send the message in the background. Once the server confirms the message has been received, the "Sending..." label is removed.
@@ -346,7 +346,7 @@ export async function deliverMessage(message) {
346346
[//]: # 'Uncomment the next line, and delete this line after the `useOptimistic` reference documentation page is published'
347347
[//]: # 'To learn more about the `useOptimistic` Hook see the [reference documentation](/reference/react/useOptimistic).'
348348
349-
### Handling form submission errors {/*handling-form-submission-errors*/}
349+
### Handle form submission errors {/*handling-form-submission-errors*/}
350350
351351
In some cases the function called by a `<form>`'s `action` prop throws an error. You can handle these errors by wrapping `<form>` in an Error Boundary. If the function called by a `<form>`'s `action` prop throws an error, the fallback for the error boundary will be displayed.
352352
@@ -446,7 +446,7 @@ export async function signUpNewUser(newEmail) {
446446
447447
Learn more about updating state from a form action with the [`useActionState`](/reference/react/useActionState) docs
448448
449-
### Handling multiple submission types {/*handling-multiple-submission-types*/}
449+
### Handle multiple submission types {/*handling-multiple-submission-types*/}
450450
451451
A form can have more than one submit button, each running a different action. Set the `formAction` prop on a `<button>` to override the `<form>`'s `action` when that button submits the form.
452452

0 commit comments

Comments
 (0)