Skip to content

Function: useForm() ​

ts
function useForm<FormDefinition>(definition, ...args): Form<FormDefinition>;

Defined in: vue/src/use-form.ts:59

Creates a form whose node states are reactive. Options left out come from the app's createFormTreePlugin defaults. Inside a component the form id comes from useId(); when the scope ends, the subscription stops and pending checks are cancelled.

Type Parameters ​

Type Parameter
FormDefinition extends Definition

Parameters ​

ParameterType
definitionFormDefinition
...argsUseFormArguments<FormDefinition>

Returns ​

Form<FormDefinition>

Released under the MIT License.