Skip to content

Latest commit

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

React-hook-form-context

This is a wrapper on react-hook-form with some additional Benefits.

  • Use multiple form in your component without need to managing context of them.
  • Be type safe when use all of react-hook-form utils.

Create Context

constFormContext=createFormContext({param: "",});functionApp(){return(<FormContext.Providermode="submit"revalidateMode="onChange">
...rest
</FormContext.Provider>);}//In your Componentconst{ param }=FormContext.useWatch();<FormContext.Controllername="param"render={({field})=><input{...field}>}/>

About

A wrapper on react-hook-form with all of it features.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages