Create Login Forms in React Native the Easy way

Sdílet
Vložit
  • čas přidán 7. 09. 2024
  • There are several great libraries to create forms in React Native. You may already be familiar with the popular Formik library, but React Hook Form is a more relatively new, modern approach to form building and validation using hooks. This video will help you understand the all powerful useForm hook from the library.
    Follow along with the initial code here: github.com/che...
    00:55 - Overview
    01:41 - looking at useful props in the useForm hook
    04:10 - Connecting inputs to the form using the Controller component
    07:12 - Handling form submission with the handleSubmit function
    08:42 - Updating the form state as the input text changes
    10:00 - Watching form fields using 'watch' function and 'watch' hook
    13:12 - Resetting the form
    14:16 - Using form resolvers (with Yup) to validate a form.
    19:20 - Monitoring form errors and displaying error messages for the user
    24:20 - Changing the validation mode to only validate on submit
    26:57 - Disabling the button if the form is invalid
    30:01 - Changing the button color if the form is invalid
    ⚡Connect on Facebook: / cheetahcoding
    ⚡Connect on Twitter: / cheetahcoding
    Music by www.bensound.com

Komentáře • 3

  • @osamagamal495
    @osamagamal495 Před 2 lety

    Your vids always come to the rescue. Thanks buddy.

  • @garysumhk
    @garysumhk Před 2 lety

    Thank you

  • @Loopysquish1
    @Loopysquish1 Před 2 lety

    I am getting an email about the error statements for the input text.
    TypeError: undefined is not an object (evaluating 'errors.email')
    how would I fix this
    ty~!