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. …
is It safe to memo form#control?
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? …
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…
How to suppress the validation when the input field is disabled
Is there a way to suppress the validation when the input field is disabled?
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?
useFieldArray, remove an item, then add new item.
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…
useFormArray is overriding the id on my data
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 …
useFieldArray, unable to remove item.
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:
How to validate fields when using useFieldArray()?
I am using yup validation schema and onBlur.
The fields need to be validated onBlur exit.