MCPcopy Create free account
hub / github.com/react-hook-form/react-hook-form

github.com/react-hook-form/react-hook-form

Chat with this repo
repository ↗ · DeepWiki ↗ · release v7.73.1 ↗ · + Follow · compare 13 versions

📋 React Hooks for form state management and validation (Web + React Native)

594 symbols 2,930 edges 407 files ⚖ MIT 7 documented · 1% ● updated 1d agolatest release v7.93.0 · 2026-12-05★ 44,935

Browse by type

⨍ Functions 578◇ Types & classes 16
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
    <a href="https://react-hook-form.com" title="React Hook Form - Simple React forms validation">
        <img src="https://raw.githubusercontent.com/react-hook-form/react-hook-form/master/docs/logo.png" alt="React Hook Form Logo - React hook custom hook for form validation" />
    </a>

npm downloads npm npm Discord

Get started | API | Form Builder | FAQs | Examples

Features

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 && 

Last name is required.

}
      <input {...register('age', { pattern: /\d+/ })} />
      {errors.age && 

Please enter number for age.

}
      <input type="submit" />
    </form>
  );
}

Sponsors

We’re incredibly grateful to these kind and generous sponsors for their support!

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].

Documentation website supported and backed by Vercel

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 575
Interface 12
Class 4
Method 3

Languages

TypeScript100%

Modules by API surface

src/logic/createFormControl.ts52 symbols
src/useFieldArray.ts10 symbols
scripts/apiExtractor.js6 symbols
examples/V7/customMaskedInputWithController.tsx6 symbols
examples/V6/customMaskedInputWithController.tsx6 symbols
examples/V7/typescript/UseFormMethods.tsx5 symbols
src/utils/createSubject.ts4 symbols
scripts/README/Link.js4 symbols
scripts/README/Insert.js4 symbols
examples/V7/parseFormatInputValues.tsx4 symbols
examples/V7/nestedFields.tsx4 symbols
examples/V7/customInput.tsx4 symbols

Dependencies from manifests, versioned · 12 of 51, runtime first

react-hook-formfile:.. · 1×
react-select5.9.0 · 1×
yup1.6.1 · 1×
@emotion/react11.14.0 · 1×
@emotion/styled11.14.0 · 1×
@hookform/resolvers3.9.0 · 1×
@mui/material5.16.13 · 1×
joi17.13.3 · 1×
react19.2.4 · 1×
react-dom19.2.4 · 1×
react-router-dom6.28.1 · 1×

For agents

$ claude mcp add --transport http codehub https://codehub.bot/mcp

One hosted endpoint, no key: your agent can search, read and trace react-hook-form/react-hook-form and every other graph here. Cursor, Windsurf and other clients →

⬇ download graph artifact

Ask about this repo answers extend the page