React Hook Form
Performant, flexible and extensible forms with easy-to-use validation for React applications.
Version: v7.51
Official Documentation ↗Installation
npm
npm install react-hook-formpnpm
pnpm add react-hook-formyarn
yarn add react-hook-formMethods
No methods match this filter.
FAQ
- How does React Hook Form compare to Formik in performance?
- React Hook Form is faster because it reduces unnecessary re-renders by using uncontrolled components and refs instead of controlled components. Benchmarks show it performs re-renders up to 50% fewer times than Formik.
- Can I use React Hook Form without React?
- No. React Hook Form relies on React hooks (useRef, useState, useEffect) and must be used within React components. For non-React projects, consider Zod or Yup for validation logic.
- How do I integrate Zod schema validation?
- Install @hookform/resolvers and zod, then pass the zodResolver to useForm: useForm({ resolver: zodResolver(schema) }). This replaces manual validation rules with schema-based validation.
Report a problem with this API docOpens a pre-filled issue on GitHub.