Updated version 2021: • React Hook Form - Get ... Basic usage with React Hook Form V7. Base CSB: codesandbox.io/s/brave-elgama... Complete CSB: codesandbox.io/s/pensive-jeps...
I'm late to the party on this, but this is so damn powerful! i'm right in the middle of form creation and have been writing custom hooks and validation and i'm 100% switching to this. So many out of the box features i haven't had a chance to implement yet. Thank you!
Hello, man. I'm really interested in creating hooks with react myself. Did it take you long time to develop such library? Btw, thanks a lot for it! It really is helpful and makes form developing much much easier!
If possible please make a video on how to use libraries such as yup and more advanced libraries. Because most of the other resources out there are old and don't work as expected.
thanks for this! do you need to have a form though? Can you just have inputs and a button and do the same thing? Like a button with an onClick that react hook form calls with the data? Or does it have to be a form with onSubmit ?
Can we do onChange validations , example -> firstname is required , if I type "a" in firstname and then hit backspace then errorMessage should be there instantaneously?
Thanks for the video and this great lib. The DX is more enjoyable than the one with Formik. Both libs are great, but yours allows to be up and running way faster.
Hey Bill, I am having an issue when trying to use RHF with material UI chekbox, This is my code : Even after it is checked I am getting rememberMe=" " instead of true or false.
It definitely seems to be very good library. It will make our development easier, after some experience on Formik. However the video is not that comfortable to watch because of the sounds when typing on the keyboard. Hope the other tuts videos are smoother
It really depends... I would use hook form for any forms, but I am biased. If your form is really simple, use useState otherwise learning hook form is worth a while.
@@bluebill1049 Thanks so much! already converted some of my forms to this. But, I ran into a problem when I had to return a nested object from the form. 😭
@@bluebill1049 Its not array of array but nesting conditional that is an issue. I will share full code with bug report. And thanks for the value as number and date trick. I didn't know that.
I have two code sandboxes with 2 level nested array in a discussion with Bill under github.com/react-hook-form/react-hook-form/discussions/4515 . I don't know where you got stuck, but when you provide a CSB I can have a look at our differences.
@@bluebill1049 Unfortunately above CSB runs with v6. Updating to v7-RC8 breaks things with: "TypeError: path.split is not a function". Has old syntax as input attribute -> ref={register} -> Correct now for v7rc8: codesandbox.io/s/react-hook-form-useform-template-forked-05ocy?file=/src/index.js
help me. i wtach this video and i got error when im trying make error handling for age. this is my code maybe same as this video Age: {errors?.age && {errors?.age?.message}} //message in get error the error said Property 'message' does not exist on type '{ toString?: {} | undefined; toFixed?: {} | undefined; toExponential?: {} | undefined; toPrecision?: {} | undefined; valueOf?: {} | undefined; toLocaleString?: {} | undefined; }'.ts(2339) i dont understand why, but when im running app. its working well.
@@bluebill1049 aha!! In that case definitely yes! One LAST thought if you want to keep costs down (like I say the mic is fine for your voice), a cheap external keyboard for like $20