You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/markdown/useForm.md
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ function Form() {
31
31
32
32
Available since: [`v7.41.0`](https://github.com/react-hook-form/react-hook-form/releases/tag/v7.41.0)
33
33
34
-
An object containing values of a remote source. This is useful when you have data that can change while the user is filling out the form and you want to keep your client-side form values in sync with the remote data.
34
+
An `object` containing values of a remote source. This is useful when you have data that can change while the user is filling out the form and you want to keep your client-side form values in sync with the remote data.
35
35
36
36
```js
37
37
const { data } =useQuery({
@@ -53,7 +53,7 @@ Available since: [`v7.41.0`](https://github.com/react-hook-form/react-hook-form/
53
53
54
54
When [`values`](#values)**is provided**, you can also provide [`resetOptions`](#values-resetoptions) to determine what form values and states should be updated when the `values` change.
55
55
56
-
Currently, [`resetOptions`](#values-resetoptions) is an object of `boolean` properties that correspond to the [`reset`](#reset) method's options.
56
+
Currently, [`resetOptions`](#values-resetoptions) is an `object` of `boolean` properties that correspond to the [`reset`](#reset) method's options.
57
57
58
58
> **Developer commentary**: The [`resetOptions`](#values-resetoptions) description can potentially be moved to the [`reset`](#reset) method's description and linked to from here. I'll will leave it here for now to emphasis the [`values` + `resetOptions`](#values-resetoptions) usage.
59
59
@@ -81,7 +81,7 @@ When `true`, all form values will be kept the same despite the new [`values`](#v
81
81
82
82
##### keepDefaultValues
83
83
84
-
When `true`, all form values will be updated with the new [`values`](#values) but [`formState.defaultValues`](#) will remain the same despite the new [`values`](#values). This is useful when you want to update the form values with new data and sync form dirtiness states according to the new values.
84
+
When `true`, all form values will be updated with the new [`values`](#values) but [`formState.defaultValues`](#defaultvalues) will remain the same despite the new [`values`](#values). This is useful when you want to update the form values with new data and sync form dirtiness states according to the new values.
85
85
86
86
> **Note**
87
87
> The input's dirtiness will be checked upon the [`values`](#values) update and the input will be marked as dirty if the new value is different from the default value. This will update both the [`formState.dirtyFields`](#dirtyfields) and [`formState.isDirty`](#isdirty) states accordingly.
@@ -135,32 +135,32 @@ useForm({
135
135
136
136
`useForm` returns a form instance containing the following properties:
137
137
138
-
#### `watch`
138
+
-[`handleSubmit`](handlesubmit)
139
139
140
-
#### `getValues`
140
+
-[`register`](register)
141
141
142
-
#### `getFieldState`
142
+
-`control` - An `object` containing **internal** library methods and properties. You **should not** use this property directly at this time.
0 commit comments