{
 "kind": "tool",
 "slug": "react-hook-form",
 "path": "tools/react-hook-form/",
 "name": "React Hook Form",
 "maker": null,
 "density": "profile",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Forms, validation and schemas",
   "tools/forms-validation/"
  ]
 ],
 "lead": "Performant form state library using React Hooks with minimal rerenders.",
 "chips": [
  {
   "label": "Forms, validation and schemas",
   "path": "tools/forms-validation/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install react-hook-form"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/react-hook-form/react-hook-form"
  },
  {
   "label": "Website",
   "href": "https://react-hook-form.com"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from npm.",
   "src": "https://github.com/react-hook-form/react-hook-form"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 22, 2026",
   "note": "Latest GitHub release Nov 11, 2026. ",
   "src": "https://github.com/react-hook-form/react-hook-form"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "569 projects",
   "status": "info",
   "sub": "#2 of 63 in its category",
   "note": "Dependency in 569 public GitHub projects set up for AI coding agents that we scanned (9.1%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Community skills",
   "status": "info",
   "sub": "1 skills by others",
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What React Hook Form does",
   "parts": [
    {
     "t": "prose",
     "text": "React Hook Form is built around uncontrolled inputs: <code>register</code> captures the input's ref instead of wiring <code>value</code>/<code>onChange</code> through React state, and the maintainers present this as the way to cut re-renders while users type."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "React Hook Form popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "86",
       "of": "/ 100",
       "l": "Gid Score, #23 overall"
      },
      {
       "n": "68.3M",
       "l": "downloads a week, npm"
      },
      {
       "n": "44.9K",
       "l": "GitHub stars"
      },
      {
       "n": "569",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How React Hook Form is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "React Hook Form is a dependency in 569 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (11.7% of the 4,867 JavaScript/TypeScript ones), #2 of 63 in forms, validation and schemas.",
      "Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 2,187; those are left out of every share on this page.",
      "The most used alternative in our scan is TanStack Form (20 projects).",
      "Projects that use it most often also use clsx (89.3%), Lucide React (88.4%), Tailwind Merge (88.4%).",
      "It is more common in projects set up for Roo Code (16.2%) than for OpenCode (5.2%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "299 projects, 12.2%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "271 projects, 8.3%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "248 projects, 8.2%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "39 projects, 14.0%",
       "v": "Devin Desktop",
       "path": "agents/devin-desktop/"
      },
      {
       "l": "35 projects, 7.5%",
       "v": "OpenAI Codex",
       "path": "agents/openai-codex/"
      },
      {
       "l": "31 projects, 6.5%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      },
      {
       "l": "18 projects, 5.2%",
       "v": "OpenCode",
       "path": "agents/opencode/"
      },
      {
       "l": "18 projects, 16.2%",
       "v": "Roo Code",
       "path": "agents/roo-code/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 89.3% of its projects",
       "v": "clsx",
       "path": "tools/clsx/"
      },
      {
       "l": "In 88.4% of its projects",
       "v": "Lucide React",
       "path": "tools/lucide-react/"
      },
      {
       "l": "In 88.4% of its projects",
       "v": "Tailwind Merge",
       "path": "tools/tailwind-merge/"
      },
      {
       "l": "In 87.0% of its projects",
       "v": "React Hook Form Resolvers",
       "path": "tools/hookform/"
      },
      {
       "l": "In 83.8% of its projects",
       "v": "Class Variance Authority",
       "path": "tools/class-variance-authority/"
      },
      {
       "l": "In 90.3% of its projects",
       "v": "Zod",
       "path": "tools/zod/"
      },
      {
       "l": "In 100.0% of its projects",
       "v": "React",
       "path": "tools/react/"
      },
      {
       "l": "In 74.9% of its projects",
       "v": "Radix UI",
       "path": "tools/radix-ui/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "React Hook Form in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Controlled fields re-render alone",
       "v": "Most inputs stay uncontrolled. When a component has to be controlled, the FAQ says <code>Controller</code> or <code>useController</code> limits re-renders to that one field."
      },
      {
       "l": "Per-input subscriptions",
       "v": "The site says you can subscribe to updates for a single input or for form state without re-rendering the entire form."
      },
      {
       "l": "No dependencies",
       "v": "The maintainers describe it as \"a tiny library without any dependencies.\" The README lists \"Small size and no dependencies\" among its features."
      },
      {
       "l": "Schema validators through resolvers",
       "v": "The README says it supports Yup, Zod, AJV, Superstruct, Joi \"and others\", linking the separate resolvers repository."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Class components need a wrapper",
       "v": "The FAQ answers \"No, not out of the box\" for class components. Its suggestion is to build a wrapper around the hook and use that in the class component."
      },
      {
       "l": "Setting <code>value</code> breaks typing",
       "v": "The FAQ ties the \"first keystroke not working\" problem to passing <code>value</code>. Use <code>defaultValue</code> per field or <code>defaultValues</code> on the form instead."
      },
      {
       "l": "Sharing the ref takes extra wiring",
       "v": "The library needs the input's ref. If you also need a ref for focus or scrolling, the FAQ splits <code>ref</code> out of <code>register()</code> and passes the element to both in one callback."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Quickstart: register inputs and show errors"
    },
    {
     "t": "tabs",
     "label": "Example",
     "items": [
      {
       "tab": "Jsx",
       "code": "import { useForm } from 'react-hook-form';\n\nfunction App() {\n  const {\n    register,\n    handleSubmit,\n    formState: { errors },\n  } = useForm();\n\n  return (\n    <form onSubmit={handleSubmit((data) => console.log(data))}>\n      <input {...register('firstName')} />\n      <input {...register('lastName', { required: true })} />\n      {errors.lastName && <p>Last name is required.</p>}\n      <input {...register('age', { pattern: /\\d+/ })} />\n      {errors.age && <p>Please enter a number for age.</p>}\n      <input type=\"submit\" />\n    </form>\n  );\n}"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about React Hook Form",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "GitHub Sponsors: https://github.com/bluebill1049",
        "GitHub Sponsors: https://github.com/jorisre",
        "GitHub Sponsors: https://github.com/kotarella1110",
        "Open Collective: https://opencollective.com/react-hook-form",
        "Own page: https://youtube.com/@bluebill1049",
        "7 GitHub sponsors"
       ]
      },
      {
       "title": "Agent Skills for it",
       "path": "skills/",
       "items": [
        "react-hook-form: React Hook Form performance optimization for client-side form validation using useForm, useWatch, useController, useFieldArray, the subscrib"
       ]
      },
      {
       "title": "Packages around it",
       "items": [
        "zod: Schema validation",
        "clsx: Conditional class names",
        "lucide-react: Icons",
        "tailwind-merge: Tailwind class merging",
        "@hookform: Schema resolvers",
        "class-variance-authority: Variant class names"
       ]
      },
      {
       "title": "More in Forms, validation and schemas",
       "path": "tools/forms-validation/",
       "items": [
        {
         "text": "Zod",
         "path": "tools/zod/"
        },
        {
         "text": "Pydantic",
         "path": "tools/pydantic/"
        },
        {
         "text": "React Hook Form Resolvers",
         "path": "tools/hookform/"
        },
        {
         "text": "Ajv",
         "path": "tools/ajv/"
        },
        {
         "text": "jsonschema",
         "path": "tools/jsonschema/"
        },
        {
         "text": "ajv-formats",
         "path": "tools/ajv-formats/"
        },
        {
         "text": "zod-to-json-schema",
         "path": "tools/zod-to-json-schema/"
        },
        {
         "text": "Protocol Buffers",
         "path": "tools/protobuf/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "React Hook Form",
       "me": true,
       "facts": [
        "MIT",
        "Gid 86",
        "68.3M/wk"
       ]
      },
      {
       "name": "TanStack Form",
       "why": "Type-safe form state management for React with validation and error handling.",
       "path": "tools/tanstack-react-form/",
       "facts": [
        "MIT",
        "Gid 64",
        "7.2M/wk"
       ]
      },
      {
       "name": "Formik",
       "why": "Popular React form state management library with validation and submission handling.",
       "path": "tools/formik/",
       "facts": [
        "Apache-2.0",
        "Gid 66",
        "6.4M/wk"
       ]
      }
     ],
     "more": "Compare React Hook Form with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "npm install react-hook-form"
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## React Hook Form\n- Wire native inputs with `{...register('name', rules)}`. Do not add `value`/`onChange` state: `register` captures the ref.\n- Never pass `value` to a registered input. Initialize with `defaultValues` on `useForm`, or `defaultValue` per field.\n- For async initial data, make `defaultValues` an async function, or pass fetched data as `values` with `resetOptions: { keepDirtyValues: true }`.\n- Wrap components that must stay controlled in `Controller` or `useController`, so only that field re-renders.\n- If you need your own ref, destructure `const { ref, ...rest } = register('x')` and pass the element to both RHF's `ref` and your own ref in one callback.\n- To clear a form including errors, use RHF's `reset()`. `HTMLFormElement.reset()` only clears input/select/checkbox values.\n- For accessible errors, set `aria-invalid` from `errors.field` and render the message in an element with `role=\"alert\"`.\n"
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm react-hook-form"
  ],
  [
   "Category",
   "Forms, validation and schemas"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Latest version",
   "v7.90.0, October 10, 2026"
  ],
  [
   "On GitHub since",
   "March 2019"
  ],
  [
   "Gid Score",
   "86.5"
  ],
  [
   "Rank in category",
   "#2 of 63"
  ],
  [
   "GitHub",
   "react-hook-form/react-hook-form"
  ],
  [
   "Last change",
   "Nov 22, 2026"
  ]
 ],
 "good": [],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/react-hook-form.png"
}