Prompt Buddy logoPrompt Buddy

react-hook-form · React Hook Form Docs

useForm

The primary hook for initializing and managing form state, including configuration for validation strategies, default values, and error handling behavior.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

useForm

The primary hook for initializing and managing form state, including configuration for validation strategies, default values, and error handling behavior.

When To Use

Use when you need to initialize a form with specific validation modes, default values, or error handling behaviors in a React application.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/useform-workflow-guide.mdA technical reference documenting the useForm hook, including its props, modes, and available methods like register, watch, and handleSubmit.Questions about a technical reference documenting the useForm hook, including its props, modes, and available methods like register,...

What This Skill Covers

  • Select page... register unregister formstate watch subscribe handlesubmit reset resetField setError clearErrors setValue setFocus getValues getFieldState tri...
  • Main sections: useForm: UseFormProps, Props, mode: onChange | onBlur | onSubmit | onTouched | all = 'onSubmit' ! React Native: compatible with Controller, reValidateMode: onChange | onBlur | onSubmit = 'onChange' ! React Native: Custom register or using Controller, defaultValues: FieldValues | () = Promise.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://react-hook-form.com/docs/useform