fix: remove form.Form for headless form.getFormProps()

This commit is contained in:
Tanner Linsley
2023-05-04 15:39:15 -07:00
parent 357235342e
commit b37628d337
5 changed files with 20 additions and 49 deletions

View File

@@ -8,9 +8,9 @@ title: Form API
When using `@tanstack/react-form`, the [core form API](../../reference/formApi) is extended with additional methods for React-specific functionality:
- ```tsx
Form: FormComponent
getFormProps: () => FormProps
```
- A pre-bound and type-safe form component, specific to this forms instance.
- A function that returns props for the form element.
- ```tsx
Field: FieldComponent<TFormData>
```

View File

@@ -32,14 +32,3 @@ A type representing a form component.
- `(props: FormProps) => any`
- A function that takes `FormProps` as an argument and returns a form component.
### `createFormComponent`
```tsx
export function createFormComponent(formApi: FormApi<any>): FormComponent
```
A function that creates a form component with the provided form API instance.
- `formApi`
- An instance of the `FormApi<any>` class.