Hooked-Form

Hooked-Form

  • API

›hooks

philosophy

  • Why

components

  • HookedForm
  • Form

hooks

  • useField
  • useError
  • useFieldArray
  • useFormConnect
  • useSpy

types

  • Static Typing

useFormConnect

This hook will return you the current context and be updated on every change within that context.

nametype-signaturedescription
errorsobjectThe current errors in your form
formErrorstringThe current formError
isSubmittingbooleanThe state of your submit
resetForm() => voidResets the form to initialValues or an empty object
setFieldError(fieldId: string, error: string) => voidSet a field level error
setFieldValue(fieldId: string, value: any) => voidSet the value for a field
setFieldTouched(fieldId: string, touched: boolean) => voidSet the touched state of a field
submit() => voidManually triggers a submit
touchedobjectThe touched state of your form
validate() => ErrorsManually calls a validate
valuesobjectThe vlaues in your form
← useFieldArrayuseSpy →
Docs
API
Community
Twitter
More
GitHubStar
Copyright © 2020 Jovi De Croock