Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IUseFieldHook<T>

Create useField type returning IUseField.

Type parameters

Hierarchy

  • IUseFieldHook

Callable

  • Creates hook to form field element.

    example

    const firstName= useField('key', true);

    example
    {firstName.required}

    Type parameters

    • K: string

    Parameters

    • name: K

      the name of the field to create hook for.

    • virtual: boolean

      when true is a virtual property.

    Returns IUseField<T & Record<K, T>, RegisterVirtual<T>>

  • Creates hook to form field element.

    example

    const firstName= useField('firstName');

    example
    {firstName.required}

    Type parameters

    • K: string

    Parameters

    • name: K | KeyOf<T>

      the name of the field to create hook for.

    Returns IUseField<Record<K, T>>

Generated using TypeDoc