React Hook Form V7 - Get Started

Поділитися
Вставка
  • Опубліковано 8 вер 2024
  • Updated version 2021: • React Hook Form - Get ...
    Basic usage with React Hook Form V7.
    Base CSB:
    codesandbox.io...
    Complete CSB:
    codesandbox.io...

КОМЕНТАРІ • 136

  • @namlevan2929
    @namlevan2929 3 роки тому +13

    very straightforward. finally, I escaped from Formik

  • @kadoosh
    @kadoosh 3 роки тому +9

    My mind was blown when I saw how often it re-renders.

    • @bluebill1049
      @bluebill1049  3 роки тому +2

      Thanks, Kai. Yes, you can subscribe to individual formState with v7. 💪🏻 Thank you for your support over the years.

    • @kadoosh
      @kadoosh 3 роки тому +1

      @@bluebill1049 sure man, thank YOU for the aswesome library

  • @aaronemery7798
    @aaronemery7798 2 роки тому +12

    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!

  • @RealEstate3D
    @RealEstate3D 3 роки тому +6

    Thank you very much Bill. It seems you don’t need much sleep. Your work for the community is awesome.

    • @bluebill1049
      @bluebill1049  3 роки тому +5

      Thanks, buddy, I try my best and this is probably going to be my last open-source project so I want this to be the best.

    • @nearhuscarl386
      @nearhuscarl386 3 роки тому +2

      @@bluebill1049 May I ask why? It's sad to see somebody brilliant like you leave the open source community :(

    • @luaneaquino7835
      @luaneaquino7835 3 роки тому +1

      @@bluebill1049 you are doing a great work, thanks!

    • @bluebill1049
      @bluebill1049  3 роки тому

      @@luaneaquino7835 Thank you very much, Luane.

    • @bluebill1049
      @bluebill1049  3 роки тому +3

      @@nearhuscarl386 Don't worry, I am still going strong to support and maintain this library. I just probably will only focus on this one.

  • @novailoveyou
    @novailoveyou 3 роки тому +13

    This is great!
    Top in class dev experience with an amazing form at the end
    Thank you! Much love!

  • @TurboPenguinnn
    @TurboPenguinnn 3 роки тому +3

    Thanks man. Perfect explanation to upgrade to V7 and how to use validation

  • @jeramelalinsugay6143
    @jeramelalinsugay6143 2 роки тому +2

    Amazing, so powerful it helps a lot with the form validation and subscription of fields are very handy!

  • @lollolich2399
    @lollolich2399 3 роки тому +2

    Wow, this library is gonna save a load of my time. What a great tool!

  • @sergiob3698
    @sergiob3698 3 роки тому +4

    Glad you use TS. thank you.

  • @taipham6799
    @taipham6799 3 роки тому +3

    and the last word I want to say this video so amazing. please release part 2.

    • @bluebill1049
      @bluebill1049  3 роки тому

      Thank you, Tai. Once the lib's maintenance is slows down a bit, I will make more videos!

  • @hesamalavi9
    @hesamalavi9 3 роки тому +3

    Simple yet powerful!

  • @Ernuna
    @Ernuna 3 роки тому +1

    Thank you sir for you explanation, you are the reason why I can solve my problems with RHF at my job )))

  • @hooyah
    @hooyah 2 роки тому +1

    I hope one day I can be a useful person like you bil.

    • @bluebill1049
      @bluebill1049  2 роки тому +1

      Yes, you will. I am just an ordinary individual like yourself. In fact, we also share a comment attribute: kind heart.

  • @sougataghar1179
    @sougataghar1179 3 роки тому +1

    I barely subscribe but when I do , that guy is awesome . Thanks for teaching me !

    • @bluebill1049
      @bluebill1049  3 роки тому

      Thank you very much for the support!

  • @bluebill1049
    @bluebill1049  2 роки тому +1

    Appolgize for the keyboard noise. I am planing to redo this video.

    • @jsricochet
      @jsricochet Рік тому +1

      I actually liked it. Keyboard sound == feeling at home :)

  • @Franiveliuselmago
    @Franiveliuselmago 2 роки тому +1

    This was really helpful. Thanks a lot.

  • @jedliu8671
    @jedliu8671 3 роки тому +4

    RHF is a great project, especially with so many CSB examples! Great job! Thank you!

  • @jsricochet
    @jsricochet Рік тому +1

    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.

  • @skendereducation6276
    @skendereducation6276 Рік тому +1

    Good job man!

  • @MrAbuYT
    @MrAbuYT 2 роки тому +1

    Thanks for that overview!

  • @deepasimplecooking
    @deepasimplecooking 2 роки тому +1

    Thank you, nice explanation 👍

  • @binov5012
    @binov5012 2 роки тому +1

    Great job guy🏆

  • @amirmoradnejad9976
    @amirmoradnejad9976 2 роки тому +1

    thank you.

  • @YiannisChristodoulou
    @YiannisChristodoulou 3 роки тому +1

    Great tutorial.
    Thank you so much, Bill.

  • @AliRaza-nm3eu
    @AliRaza-nm3eu Рік тому +1

    really helpful sir...

  • @logic7878
    @logic7878 3 роки тому +1

    Thank you.
    Nice showcase!

    • @bluebill1049
      @bluebill1049  3 роки тому

      Awesome to hear, glad you like it.

  • @vgvdms
    @vgvdms 2 роки тому +1

    This is Lovely. simple and powerful. Thanks a lot :)

  • @tomascarignano5002
    @tomascarignano5002 2 роки тому

    Thank you for this amazing library!

  • @hassaniyouness8024
    @hassaniyouness8024 3 роки тому +1

    much helpful thank u so much

  • @migueljurado6783
    @migueljurado6783 3 роки тому +1

    You are the best bro! Thanks for your explanation :3

  • @sombert1054
    @sombert1054 2 роки тому +1

    Great work! Thanks a lot!

  • @thesodabomber7411
    @thesodabomber7411 3 роки тому +1

    Thank you for this!

  • @HoshiramaSensei
    @HoshiramaSensei 3 роки тому +1

    thanks a lot!

  • @ricardorien
    @ricardorien 3 роки тому +1

    this is amazing, simple and powerfull!

  • @Matt36788
    @Matt36788 3 роки тому +1

    valueAsNumber..... 🤯

  • @christopherobrien6215
    @christopherobrien6215 3 роки тому

    tutorials with typescript are needed!

  • @bluediu1714
    @bluediu1714 3 роки тому +1

    this is amazing, thank you 😮😮

  • @georgesmbella6153
    @georgesmbella6153 3 роки тому +1

    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

    • @bluebill1049
      @bluebill1049  3 роки тому +1

      Thanks for the feedback. I am not a professional UA-camr, my focus will remain on the lib itself, but if I make another video, this will be noted.

  • @DevOpsHasan
    @DevOpsHasan 3 роки тому +1

    Please share how to load data in edit operation.

  • @asifkaif356
    @asifkaif356 3 роки тому +1

    form validation in react hook form v7 using Material ui textfield components, please make tutorial on this

  • @onion_____
    @onion_____ 3 роки тому +1

    thanks this was legit

  • @rohan1765
    @rohan1765 3 роки тому +1

    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?

  • @nicholassmith6412
    @nicholassmith6412 3 роки тому +1

    Useful, thank you. Have you got a video of this using Yup for form validation (e.g. for an email field)?

  • @apurv5847
    @apurv5847 3 роки тому

    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.

  • @mattmarkus4868
    @mattmarkus4868 2 роки тому

    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 ?

  • @ABsazerNer
    @ABsazerNer 3 роки тому +2

    I already using hook form and I love it, but what the new in v7?

    • @bluebill1049
      @bluebill1049  3 роки тому +1

      V7 is a huge jump in terms of Typescript support, performance, and better shcmea support. There are heaps of improvement overall.

    • @bluebill1049
      @bluebill1049  3 роки тому +2

      forgot one thing important which we worked very hard for. package reduced another 13% percentage. it's even smaller now. 💪🏻

    • @ABsazerNer
      @ABsazerNer 3 роки тому +1

      @@bluebill1049 wonderful👍👍

  • @marcinmaj3609
    @marcinmaj3609 2 роки тому

    Multi-select text input with react-select without typescript. Please

  • @ProgrammerError
    @ProgrammerError 3 роки тому

    Great work! How would you integrate with file inputs and Material-UI buttons?

  • @waqarahmad8979
    @waqarahmad8979 2 роки тому

    How to set back form values to null once we submit it????

  • @kunglane
    @kunglane 3 роки тому

    mindblowing👌

  • @Evkayne
    @Evkayne 3 роки тому

    thank you man

  • @grenadier4702
    @grenadier4702 3 роки тому

    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!

  • @limyohwan
    @limyohwan 3 роки тому

    how to customize the 'border' color when the field is selected

  • @abdulqader7516
    @abdulqader7516 3 роки тому

    I am submitting an API with react hook form,but the data fields are taken for the second time not the first time in handleSubmit(onSubmit())

  • @thedimasss
    @thedimasss 3 роки тому +1

    Please cancel noise of keyboard

  • @edigaprudhvigoud2585
    @edigaprudhvigoud2585 3 роки тому

    This video is Amazing.
    For checkbox I want to submit a value instead of false when it is unchecked.How can we do that?

    • @bluebill1049
      @bluebill1049  3 роки тому

      I would build a controlled component and wrapped with `Controller`.

  • @zulianadryan686
    @zulianadryan686 2 роки тому

    maxLength and minLength are not functioning in input as number type

    • @bluebill1049
      @bluebill1049  2 роки тому

      They are not meant to be used for number, min and max is what you after.

  • @asimgiri4269
    @asimgiri4269 3 роки тому

    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.

    • @bluebill1049
      @bluebill1049  3 роки тому

      Do you want to share a simple codesandbox and ask this question at github discussion?

  • @nurettinsen473
    @nurettinsen473 2 роки тому

    how to get data CustomInput ı cannot get data say undefıned

  • @mariosacchi9290
    @mariosacchi9290 3 роки тому +1

    please use a microphone disconnected from your keyboard next time

  • @jeromeabril5001
    @jeromeabril5001 3 роки тому

    Just a question: is it better to use hook forms than react hooks(use States) when passing data to restful apis using axios.

    • @bluebill1049
      @bluebill1049  3 роки тому +1

      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.

    • @jeromeabril5001
      @jeromeabril5001 3 роки тому

      @@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
      @bluebill1049  3 роки тому +1

      @@jeromeabril5001 name="yourDetails.firstName" ? something that like that will return an object.

    • @jeromeabril5001
      @jeromeabril5001 3 роки тому

      @@bluebill1049 i need an object that is nested though... like {name:jerome , loans:{ loan:1 , loan:2}}

    • @jeromeabril5001
      @jeromeabril5001 3 роки тому +1

      @@bluebill1049 OMG i solved it, didn't know that it had to be a string. thanks so much for the help!

  • @hooyah
    @hooyah 2 роки тому

    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
      @bluebill1049  2 роки тому

      would you like to send a question at Github discussion with a codesandbox? it should be something minor to fix.

  • @odntht
    @odntht 3 роки тому +1

    Awesome tutorial, but the typing sound is really annoying

    • @bluebill1049
      @bluebill1049  3 роки тому

      Thanks for the feedback, will try to avoid that with other videos.

  • @nhan6453
    @nhan6453 3 роки тому

    let me ask how to upload file??

  • @ApoorvMote
    @ApoorvMote 3 роки тому

    Bill I got array field and inside I have 2 level nested conditional. 1st level works but 2nd doesn't work. Maybe v7 will fix it.

    • @bluebill1049
      @bluebill1049  3 роки тому

      check this folder: github.com/react-hook-form/react-hook-form/tree/master/examples and search array of array.

    • @ApoorvMote
      @ApoorvMote 3 роки тому

      @@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.

    • @RealEstate3D
      @RealEstate3D 3 роки тому +1

      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
      @bluebill1049  3 роки тому

      @@RealEstate3D Thank you for your help. The issue has been answered in Github: github.com/react-hook-form/react-hook-form/issues/4545

    • @RealEstate3D
      @RealEstate3D 3 роки тому

      @@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

  • @judgewest2000
    @judgewest2000 2 роки тому +2

    Nice one - keyboard WAY too loud!

    • @bluebill1049
      @bluebill1049  2 роки тому +1

      Will get a proper mic next video.

    • @judgewest2000
      @judgewest2000 2 роки тому

      @@bluebill1049 a quieter keyboard. Your audio for yourself is fine.

    • @bluebill1049
      @bluebill1049  2 роки тому

      @@judgewest2000 because i don't have mic and that's why you are hearing the keyboard (MacBook, type and as i speak)

    • @judgewest2000
      @judgewest2000 2 роки тому +1

      @@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

  • @Shakas420
    @Shakas420 3 роки тому

    Using some blue switches there aren't you? 😅

  • @AntNZ
    @AntNZ 3 роки тому

    Love the tutorial. HATE ya keyboard!!

  • @thepickicool97
    @thepickicool97 3 роки тому +1

    I honestly think that the v6 was easier to use :(
    This is making me sad...

    • @bluebill1049
      @bluebill1049  3 роки тому +1

      keep use v6, it's still maintained.

  • @LongBoy.0
    @LongBoy.0 2 роки тому

    the keyboard sounds are annoying lol.