Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 319fd53

Browse files
WIP πŸ“ docs(useForm): add useForm return methods nav list
1 parent 5e085ec commit 319fd53

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

β€Žsrc/markdown/useForm.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function Form() {
3131

3232
Available since: [`v7.41.0`](https://github.com/react-hook-form/react-hook-form/releases/tag/v7.41.0)
3333

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.
3535

3636
```js
3737
const { data } = useQuery({
@@ -53,7 +53,7 @@ Available since: [`v7.41.0`](https://github.com/react-hook-form/react-hook-form/
5353

5454
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.
5555

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.
5757

5858
> **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.
5959
@@ -81,7 +81,7 @@ When `true`, all form values will be kept the same despite the new [`values`](#v
8181
8282
##### keepDefaultValues
8383

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.
8585

8686
> **Note**
8787
> 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({
135135

136136
`useForm` returns a form instance containing the following properties:
137137

138-
#### `watch`
138+
-[`handleSubmit`](handlesubmit)
139139

140-
#### `getValues`
140+
-[`register`](register)
141141

142-
#### `getFieldState`
142+
-`control` - An `object` containing **internal** library methods and properties. You **should not** use this property directly at this time.
143143

144-
#### `setError`
144+
-[`formState`](formstate)
145145

146-
#### `clearErrors`
146+
-[`watch`](watch)
147147

148-
#### `setValue`
148+
- [`reset`](reset)
149+
150+
- [`getValues`](getvalues)
149151

150-
#### `trigger`
152+
-[`setValue`](setvalue)
151153

152-
#### `formState`
154+
- [`trigger`](trigger)
155+
156+
- [`setError`](seterror)
157+
158+
- [`clearErrors`](clearerrors)
153159

154-
#### `resetField`
160+
-[`getFieldState`](getfieldstate)
155161

156-
#### `reset`
162+
-[`resetField`](resetfield)
157163

158-
#### `handleSubmit`
164+
-[`unregister`](unregister)
159165

160-
#### `unregister`
161-
162-
#### `control`
163-
164-
#### `register`
165-
166-
#### `setFocus`
166+
- [`setFocus`](setFocus)

0 commit comments

Comments
(0)

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /