Skip to main content
100%

react-hook-form

✓ Published0🌍 Public
MMuhammad Meigooni
Last edited May 11, 2021
Created on May 11, 2021
Forked from React Starter

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 description

React Starter code.

MIT Licensed

Similar vizzes