An example implementation of using Typescript with react-hook-form and Easy Peasy.
React Hook Form is built based on uncontrolled input, which means you don't need to change input value via state by onChange. Registering forn inputs ensures that react-hook-form
's handleSubmit
function will receive the form data when form validation is successful.
The fully typed global state solution for React abstracts Redux boilerplate, and also grants access to all of its power.
- Uncontrolled Components in React https://reactjs.org/docs/uncontrolled-components.html
register
andhandleSubmit
API docs https://react-hook-form.com/api#register