--- name: react-hook-form description: React Hook Form performance optimization for client-side form validation using useForm, useWatch, useController, useFieldArray, and the v7.55+ subscribe() API. This skill should be used when building client-side controlled forms with React Hook Form library. This skill does NOT cover React 19 Server Actions, useActionState, or server-side form handling (use react-19 skill for those). --- # React Hook Form Best Practices by Community Comprehensive performance optimization guide for React Hook Form applications. Contains 45 rules across 8 categories, prioritized by impact to guide form development, automated refactoring, and code generation. ## When to Apply Reference these guidelines when: - Writing new forms with React Hook Form - Configuring useForm options (mode, defaultValues, validation) - Subscribing to form values with watch / useWatch / subscribe - Integrating controlled UI components (MUI, shadcn, Ant Design) - Managing dynamic field arrays with useFieldArray - Handling async submit, server errors, and submit lifecycle state - Reviewing forms for performance issues ## When NOT to Use This Skill - **React 19 Server Actions / `useActionState`** — use the `react-19` skill instead - **Deeply nested, fully type-safe forms** — TanStack Form may be a better fit for forms with complex nested schemas; this skill assumes you've already chosen RHF - **Single-input or trivial forms** — uncontrolled `