react-hook-form

📋 React Hooks for form state management and validation (Web + React Native)

MIT License

Downloads
25.6M
Stars
39.4K
Committers
318
react-hook-form - Version 3.0.0

Published by bluebill1049 over 5 years ago

React Hook Form return a new formState: Object which contain the following information

  • dirty: when user interactive any fields
  • touched: what are the fields have interacted
  • isSubmitted: whether the form have been triggered with submitting

example:

const { formState: { dirty, touched, isSubmitted} } = useForm();
react-hook-form - Version 2.1.18

Published by bluebill1049 over 5 years ago

  • fix a bug around remove events listener
  • simplify async validation code
  • type improvement
react-hook-form - Version 2.1.17

Published by bluebill1049 over 5 years ago

  • fix a bug on safari checkbox with input event
react-hook-form - Version 2.1.16

Published by bluebill1049 over 5 years ago

  • provider warning when name is supplied during register
react-hook-form - Version 2.1.5

Published by bluebill1049 over 5 years ago

react-hook-form - Version 2.1.14

Published by bluebill1049 over 5 years ago

  • reset isSubmitted with useEffect
react-hook-form - Version 2.1.13

Published by bluebill1049 over 5 years ago

  • watch() fields no longer trigger validation error with onSubmit mode
react-hook-form - Version 2.1.11

Published by bluebill1049 over 5 years ago

  • include proper object compare
react-hook-form - Version 2.1.10

Published by bluebill1049 over 5 years ago

  • fix a bug with custom validate
react-hook-form - Version 2.1.9

Published by bluebill1049 over 5 years ago

  • fix bug on event option index and event attached
react-hook-form - Version 2.1.7

Published by bluebill1049 over 5 years ago

  • code refactoring and clean up
  • fix issue on event clean up on submit
  • fix a bug on error type and error message compare for state update
react-hook-form - Version 2.1.6

Published by bluebill1049 over 5 years ago

  • remove omitRefs.ts from the package
react-hook-form - Version 2.1.5

Published by bluebill1049 over 5 years ago

  • onSubmit should trigger errors even current errors are the same as previous
react-hook-form - Version 2.1.4

Published by bluebill1049 over 5 years ago

  • fix a bug with errors report
react-hook-form - Version 2.1.3

Published by bluebill1049 over 5 years ago

  • update readme and package.json for home page
react-hook-form - Version 2.1.2

Published by bluebill1049 over 5 years ago

  • fix a bug with watch() issue
react-hook-form - Version 2.1.1

Published by bluebill1049 over 5 years ago

  • fix the bug on watch mode
react-hook-form - Version 2.1.0

Published by bluebill1049 over 5 years ago

  • support array fields 👍

usage:

https://codesandbox.io/s/6j1760jkjk

basically: you can assign array into input/select name

<input type="test" name="firstName[0]" />
<input type="test" name="firstName[1]" />
react-hook-form - Version 2.0.3

Published by bluebill1049 over 5 years ago

  • fix onDomRemove event listeners on fields
react-hook-form - Version 2.0.2

Published by bluebill1049 over 5 years ago

  • include textarea as string input field