menu

React Hook Form

📋 Custom React hooks for form validation without the hassle

Channels
Team
Posts
Chat
Members
Info
down-caret
·77d·Pinned# General

Support us by leaving a start ⭐️@github

React Hook Form is backed by our contributors, team members and myself. If you find React Hook Form to be useful in your React project, please star to support the repo and contributors ❤ Help us to help you better. …

thumbsup
26
message-simple
0

is It safe to memo form#control?

https://github.com/react-hook-form/react-hook-form/blob/master/src/useForm.ts#L1127 It looks like this object is not memorized, which cause Controller Input re-rendering. is is it safe to memo this object at application level? …

thumbsup
0
message-simple
4

How to do parse and format?

I'm migrating from "React Final Form" to "React Hook Form", everything works except currency input. I spent a couple hours and even try to build my own controller, But can't get it done. (For some reason, my own controller will cause infinity render when I convert value in…

thumbsup
0
message-simple
5

How to suppress the validation when the input field is disabled

Hi, Is there a way to suppress the validation when the input field is disabled? Thank you.

thumbsup
0
message-simple
4

After updating to version 4.9 from version 3 `defaultValues` don't work

Hey guys so I have forms like this After updating the lib, default values do not work anymore, whenever I open a form it's always empty, though the props are in place. Anybody knows what's going on here?

thumbsup
0
message-simple
35

useFieldArray, remove an item, then add new item.

https://codesandbox.io/s/heuristic-lake-htt3t?fontsize=14&hidenavigation=1&theme=dark

thumbsup
0
message-simple
5

validate onSubmit message emptied

I'm trying to validate fields in form onBlur and onSubmit. onBlur everything seems to work as expected but onSubmit some strange behaviour occurs. Indeed onSubmit errors is updated, but message is emptied. I'm pretty sure I'm missing something, please take a look at codesandbox…

thumbsup
0
message-simple
4

useFormArray is overriding the id on my data

Hi, When I use useFormArray the id on the elements on the array gets overwritten with a generated id. I need the id to stay intact to help me do some logic later in the app. I do something like this to keep the id in the form …

thumbsup
0
message-simple
19

useFieldArray, unable to remove item.

https://codesandbox.io/s/eager-water-47p27?fontsize=14&hidenavigation=1&theme=dark

thumbsup
0
message-simple
2

Empty array as default value, fieldArray

I'm having a heck of a time trying to figure out how to add elements to a field array that starts out empty. append doesn't seem to use the values passed to it: https://codesandbox.io/s/empty-field-array-o5t3d-o5t3d

thumbsup
0
message-simple
2

How to validate fields when using useFieldArray()?

I am using yup validation schema and onBlur. The fields need to be validated onBlur exit.

thumbsup
0
message-simple
2