Get your forms hooked with react-hook-form
summary
Live demo of react-hook-form shows the actual API and behavior: useForm returns form state (isDirty, isValid), register injects onChange/onBlur/ref, and handleSubmit gives success/error callbacks; validation works via resolver with Yup or built-in rules (required, validate, valueAsNumber), form context via FormProvider registers child inputs, and reset/getValues preserve or replace defaults. Library claims on npm Trends and a 8.8 KB bundle with no dependencies (surpasses Formik) are shown and the demo features work as demonstrated.
AI-written summary · about
chapters (32)
- 0:00Introduction
- 0:31Who am I
- 1:00Challenges
- 1:18Managing
- 1:41NPN Trends
- 2:02Comparing NPN Trends
- 3:30Bundlephobia
- 5:53UseForm
- 6:27Console Log
- 6:46Register
- 7:27Clear console
- 7:41Register fields
- 8:48View data
- 9:19Precreated schema
- 9:34Scheme of relation
- 10:08Schema
- 10:46Building Validation
- 12:11Validation Mode
- 12:55Submit Mode
- 13:10Change Default Values
- 14:37Child Components
- 14:51Form Provider
- 15:44Additional Input
- 16:07Use FormContext
- 16:46See number of sessions sent
- 17:14Refresh form
- 17:33Validate
- 18:02Testing
- 18:37Reset
- 20:20New values
- 20:42Changing values
- 21:39Thank you
related talks
54mTaming Forms in React
43mModern Forms in React
46mHow not to hate your life when dealing with forms
29mStreamlined Form Management in React with Formik
25mModern Forms in React
27mEnhancing Forms with React Server Components and React 19
11mForms Don't Need to Suck
45mNext Generation Forms with React Final Form
