🌍 Public
Viewing a saved revision (read-only)
6d39555038df4cc1ba1d88ec36d68dd0
react-hook-form
This example demonstrates a React form built with react-hook-form, showing how to programmatically reset form state and values. The form uses the `useForm` hook, and a button triggers the `reset` method to set the first name field to "bill" while configuring options like `keepErrors` and `keepDirty` to preserve specific state aspects. The code also references fetching initial values from an external `formValues.json` API, and inputs are registered using the `register` function with validation rules.
AI-generated descriptionReact Starter code.