react-hook-form
React Hook Form is a performant, dependency-free form library for React that uses uncontrolled inputs and hooks (register, handleSubmit, formState) to minimize re-renders, with built-in HTML validation and schema resolvers for Zod, Yup, Joi, and others.
MITPermissive — free to use in commercial and proprietary software, with attribution.View license →
Production readiness
4/5- Actively maintainedCommits in the last 6 months
- No known vulnerabilities1 known OSV advisory
- Clear, usable licenseMIT (permissive)
- Proven adoptionWidely used
- Has documentationDocumentation indexed
npm install react-hook-formOur analysis
A React library for building and validating forms with minimal boilerplate, leaning on uncontrolled inputs and refs to keep re-renders low while exposing a hook-based API.
When to use react-hook-form
Use it for most React form needs where performance matters: large forms, frequently-changing fields, or apps wanting small bundle size. It pairs well with schema validators (Zod/Yup) and integrates with controlled UI libraries via its Controller component.
When not to
If you're not on React, you need this nowhere — use framework-native tooling. For fully controlled, granular-state-driven forms or teams already standardized on Formik's controlled model, the migration may not be worth it. TanStack Form may be preferable when you want framework-agnostic, deeply type-safe field state.
Strengths
- Minimizes re-renders via uncontrolled inputs and refs, giving strong performance on large forms
- Zero runtime dependencies and very small bundle size
- First-class TypeScript types and a broad ecosystem of schema resolvers
- Mature, widely adopted, with extensive docs and examples
Trade-offs
- Uncontrolled-by-default model has a learning curve and can be awkward with fully controlled component libraries (requires Controller)
- register/ref-based API can feel implicit and harder to debug than explicit controlled state
- Advanced dynamic forms (field arrays, conditional fields) get verbose
- Strict typing of deeply nested forms can produce complex generics
Maturity
Highly mature and battle-tested — one of the most popular React form libraries with 44k+ stars, active maintenance, corporate sponsorship, and a well-supported documentation site and resolver ecosystem.
Features
Built with performance, UX and DX in mind
Embraces native HTML form validation
Out of the box integration with UI libraries
Small size and no dependencies
Install
npm install react-hook-form
Quickstart
import { useForm } from 'react-hook-form';
function App() {
const {
register,
handleSubmit,
formState: { errors },
} = useForm();
return (
<form onSubmit={handleSubmit((data) => console.log(data))}>
<input {...register('firstName')} />
<input {...register('lastName', { required: true })} />
{errors.lastName && <p>Last name is required.</p>}
<input {...register('age', { pattern: /\d+/ })} />
{errors.age && <p>Please enter number for age.</p>}
<input type="submit" />
</form>
);
}
Sponsors
We’re incredibly grateful to these kind and generous sponsors for their support!
Major Sponsors
Follower24BuyFans
Supporting Sponsors
Thanks.devWorkleapKinstaSentNicheTossPrincipalHygraph
Past Sponsors
Thank you to our previous sponsors for your generous support!
Backers
Thanks go to all our backers! [Become a backer].
Contributors
Thanks go to these wonderful people! [Become a contributor].