Skip to content

HsharmaCoding/6-React-Form-UseFormHook-Register

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

html form using react-hook-form (register), yup and yup resolver with shared html controls and validations.

  1. react-hook-form, yup and yup resolver third partly libraries are using to handle the form state.
  2. These libraries provide rich set of features to handle the form events/values/states/validations etc.
  3. The form has been created with shared input controls and third party library.
  4. react-hook-form library is being used to handle the form values.

    Install: npm install react-hook-form

  5. yup library is being used to handle the form validations and model/schema.

    Install: npm i yup

  6. yup resolver is being used to handle yup with react-hook-form library. It acts as a middleware.

    npm i @hookform/resolvers

  7. Shared HTML conrtols:

    components/controls/CheckBox.tsx, components/controls/DropDownList.tsx, components/controls/Input.tsx, components/controls/RadioGroup.tsx

  8. Employee Page:

    components/pages/Eomployee.tsx

Please refer the attached information.txt and APP-DEMO file for more information.