Skip to content
Source
Sign inSign up
TanStack/form

fix: simplify useForm return type #1016

MergedBalastrong(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/1016/headmerged by Balastrong(GitHub profile, opens in a new tab)

Showing 6 changed files with 26 additions and 3 deletions (loading 3).

x
0 of 6 viewed, 6 left
3 additions and 3 deletionsdocs/framework/react/reference/functions/useform.mdModified
View file
@@ -6,7 +6,7 @@
# Function: useForm()
​
```ts
-function useForm<TFormData, TFormValidator>(opts?): FormApi<TFormData, TFormValidator> & ReactFormApi<TFormData, TFormValidator>
+function useForm<TFormData, TFormValidator>(opts?): ReactFormExtendedApi<TFormData, TFormValidator>
```
​
A custom React Hook that returns an extended instance of the `FormApi` class.
@@ -25,8 +25,8 @@
​
## Returns
​
-`FormApi`\<`TFormData`, `TFormValidator`\> & [`ReactFormApi`](../interfaces/reactformapi.md)\<`TFormData`, `TFormValidator`\>
+[`ReactFormExtendedApi`](../type-aliases/reactformextendedapi.md)\<`TFormData`, `TFormValidator`\>
​
## Defined in
​
-[useForm.tsx:57](https://github.com/TanStack/form/blob/main/packages/react-form/src/useForm.tsx#L57)
+[useForm.tsx:65](https://github.com/TanStack/form/blob/main/packages/react-form/src/useForm.tsx#L65)
22 additions and 0 deletionsdocs/framework/react/reference/type-aliases/reactformextendedapi.mdAdded
View file
@@ -0,0 +1,22 @@