Skip to content

Function: useField() ​

Call Signature ​

ts
function useField<Value, Output>(source): FieldView<Value, Output>;

Defined in: vue/src/use-field.ts:49

Binds a field node to an input, typed by the node.

Type Parameters ​

Type Parameter
Value
Output

Parameters ​

ParameterType
sourceMaybeRefOrGetter<FieldNode<Value, Output>>

Returns ​

FieldView<Value, Output>

Call Signature ​

ts
function useField<Value>(name): FieldView<Value | undefined, unknown>;

Defined in: vue/src/use-field.ts:53

Binds the field at name, relative to the nearest provided node, to an input. The name may be a ref or a getter.

Type Parameters ​

Type Parameter
Value

Parameters ​

ParameterType
nameMaybeRefOrGetter<string>

Returns ​

FieldView<Value | undefined, unknown>

Released under the MIT License.