Skip to content

Practical example of using react-form-hook for login form

Notifications You must be signed in to change notification settings

przpiw/react-hook-form-login

Repository files navigation

Practical example how to build login form with react hook form with basic validation and error handling.

Building reusable forms can be sometimes challanging. In this tutorial I will describe how we can design reusable form components with react useForm hook. We will use next.js boilerplate for this demonstration

React Hook Form

  • Login Form implementation
  • Validation

React Hook Form adopts the use of uncontrolled inputs using ref instead of depending on the state to control the inputs. This approach makes the forms more performant and reduces the number of re-renders.

The package small in side and it has zero dependencies. The API is well documented and provides a seamless experience to developers when working with forms. React Hook Form follows HTML standards for validating the forms using constraint-based validation API.

Start app with

npm run dev

About

Practical example of using react-form-hook for login form

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published