Skip to content
Source
Sign inSign up
TanStack/form
Open History to see the last commit

useForm.md

18 lines503 Bytes

useForm

export function useForm<
  TFormData,
  TFormValidator extends Validator<TFormData, unknown> | undefined = undefined,
>(
  opts?: FormOptions<TFormData, TFormValidator>,
): FormApi<TFormData, TFormValidator>

A custom React Hook that returns an instance of the FormApi class. This API encapsulates all the necessary functionalities related to the form. It allows you to manage form state, handle submissions, and interact with form fields