React Hooks Form

React Hooks Form

  • Guides
  • Components
  • Hooks
  • Github

›Hooks

Getting Started

  • Overview
  • Usage

Guides

  • Organizing Your Fields
  • Client-side Validation
  • Server-side Validation
  • Input Components
  • Form Submission
  • Using Hooks

Components

  • <Form />
  • <FormField />

Hooks

  • useFormFieldValue
  • useFormFieldMeta
  • useFormValues
  • useFormMeta
  • useForm

useFormValues

Use this hook to get the whole form values.

Signature

useFormValues([formName])

Params

NameDescription
formNameOPTIONAL! Name of the form. You do NOT need to pass this if you use it inside the form context.

Return Value

An object of form values.

Example

function FormLog() {
  const formValues = useFormValues();
  console.log(formValues);
  return 'This component logs form data to the console.';
}
← useFormFieldMetauseFormMeta →
  • Signature
  • Params
  • Return Value
  • Example
Docs
Getting StartedGuidesComponentsHooks
Community
Stack Overflow
More
Star
Copyright © 2019 Mehdi Namvar