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.
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
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/useform-workflow-guide.md | A 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
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://react-hook-form.com/docs/useform