useFormValues

    A utility hook for reading (and subscribing) to a pience of form data.

    You can also subscribe to multiple paths at once by providing an array of paths.

    API

    import { useFormValues } from 'react-formal';
    • useFormValues(field: string) => any

      Returns the current Field value at the provided path.

      Parameters

      • fieldstring

        a field path to observe.

      Return Value
      any

    • useFormValues(fields: string[]) => any[]

      Returns an array of values for the provided field paths.

      Parameters

      • fieldsstring[]

        a set of field paths to observe.

      Return Value
      any[]