useForm

Function: useForm()

ts
function useForm<TFormData, TFormValidator>(opts?): FormApi<TFormData, TFormValidator> & ReactFormApi<TFormData, TFormValidator>

A custom React Hook that returns an extended 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

Type Parameters

TFormData

TFormValidator extends undefined | Validator<TFormData, unknown> = undefined

Parameters

opts?: FormOptions<TFormData, TFormValidator>

Returns

FormApi<TFormData, TFormValidator> & ReactFormApi<TFormData, TFormValidator>

Defined in

useForm.tsx:57

Subscribe to Bytes

Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.

Bytes

No spam. Unsubscribe at any time.

scarf analytics