Field

Function: Field()

ts
function Field<TParentData, TName, TFieldValidator, TFormValidator, TData>(__namedParameters): ReactNode
function Field<TParentData, TName, TFieldValidator, TFormValidator, TData>(__namedParameters): ReactNode

A function component that takes field options and a render function as children and returns a React component.

The Field component uses the useField hook internally to manage the field instance.

Type Parameters

TParentData

TName extends string | number

TFieldValidator extends undefined | Validator<DeepValue<TParentData, TName>, unknown> = undefined

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

TData = DeepValue<TParentData, TName>

Parameters

__namedParameters: FieldComponentProps<TParentData, TName, TFieldValidator, TFormValidator, TData>

Returns

ReactNode

Defined in

useField.tsx:164

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.