Function useField

  • Creates the new field.

    Type Parameters

    • Value = any

      The root field value.

    Returns Field<Value | undefined>

    The Field instance.

  • Creates the new field.

    Type Parameters

    • Value

      The root field value.

    Parameters

    • initialValue: Value | (() => Value)

      The initial value assigned to the field.

    Returns Field<Value>

    The Field instance.

  • Creates the new field enhanced by a plugin.

    Type Parameters

    • Value

      The root field value.

    • Plugin

      The plugin injected into the field.

    Parameters

    • initialValue: Value | (() => Value)

      The initial value assigned to the field.

    • plugin: PluginInjector<Plugin>

      The plugin injector that enhances the field.

    Returns Field<Value, Plugin>

    The Field instance.

  • Creates the new field enhanced by a plugin.

    Type Parameters

    • Value

      The root field value.

    • Plugin

      The plugin injected into the field.

    Parameters

    Returns Field<Value, Plugin>

    The Field instance.