API Reference

React Hook Form

Performant, flexible and extensible forms with easy-to-use validation for React applications.

Official Documentation ↗
CompatibilityThis documentation covers version v7.51. Check the official docs for the latest API surface.

Installation

npmnpm install react-hook-form
pnpmpnpm add react-hook-form
yarnyarn add react-hook-form

Methods

React Hook Form is a performant, flexible and extensible forms library for React. It adopts uncontrolled components with refs to minimize re-renders, resulting in better performance compared to controlled-component form libraries. It provides a simple API for form state management, validation, and submission with minimal boilerplate.

Key Features

  • Performance: Minimizes re-renders by using uncontrolled components
  • Type-safe: Full TypeScript support with type inference from Zod schemas
  • Flexible validation: Built-in validation rules or integrate with Zod/Yup/Joi
  • Small bundle size: ~9KB gzipped with no dependencies
  • DevTools: Optional form state inspection via @hookform/devtools

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.