React Multi-Step Form Tutorial: Using Formik, Yup and material-ui

Поділитися
Вставка
  • Опубліковано 12 вер 2024

КОМЕНТАРІ • 561

  • @BrunoAntunesPT
    @BrunoAntunesPT  2 роки тому +9

    Learn how to Unit-Test this form: ua-cam.com/video/MhFSuOjU624/v-deo.html

  • @cseguino
    @cseguino 4 роки тому +5

    This was really huge! Advanced contents about formik and typescript, many thanks! Continue like this and you'll be a millionnaire soon :)

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +1

      Wow, thank you very much! I wish your prediction is correct =D =D =D

  • @washingtoncampos6862
    @washingtoncampos6862 4 роки тому +7

    OMG, I just opened UA-cam and saw you’re notification, I came faster than a rocket hahahaha great vídeo my friend, you’re always bringing the best content thank you 😊

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      Thank you very much my friend Washington 😊
      Your comments are always super friendly, thank you!!! 😊😊😊😊

  • @ReadWriteExercise
    @ReadWriteExercise 2 роки тому +4

    Fantastic video and super helpful! This should be in the Formik docs. Also very very respectable that you tell people that you're just doing styling at 29:00 so if they don't care about then then they don't need to watch anymore 🙌

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

      Thank you very much 😍 I really appreciate it 🙂🙂

  • @honeypatre
    @honeypatre 4 роки тому +1

    OMG Buddy, this is the first video I saw of yours and after banging my head on wall for 2 days to be able to do a formik and stepper together and also fetching the values with validation, uhhh, I finally found this and it worked so so well for me, Thank you so much. Keep going, I instantly subscribed . Thanksss a Lottttt

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      Thank you very much 😀😀
      It is soo good to read your comment - I'm really really happy I was able to help 🙏🙏

  • @danishdarren1179
    @danishdarren1179 4 роки тому +7

    Finally found it ! was looking from days,,, Good work here.

  • @josepadilla4024
    @josepadilla4024 11 місяців тому

    I'm having to make a form with these exact technologies- I'm unfamiliar with materialUI and Formik. Your video is VERY clear even to someone that isn't comfortable with some of the tech. I especially like how you first do a "naive" approach and then build into a more optimized version. I am looking at the code for each step and just think "wow that's genius and makes a lot of sense". Thanks!

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

    That video is amazing! Thank you, it was a very beautiful explanation. The only thing I changed from your sample was the material UI component because I use Tailwind in my project so I had to add the ErrorMessage component to showing the validation messages with the TW style classes. But the logic is simple and clear to understand. Won a subscriber already!

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

      Thank you very much Tom =D
      I have to try tailwind, there's a lot of good words about it on the community, but I'm so in love with Material-UI that I think it will be hard to leave material-ui behind =D eheheh

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

    I lack the ability to express how amazing you are because I've been rendered speechless from your genius! Thanks again Bruno!

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

      I'm very happy by your words ☺️☺️ thank you soooo much Danny ❤️

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

      @@BrunoAntunesPT How would I add a function for a click on a button within a FormikStep that would allow me to update a field value in the initialValues object? I have 3 buttons or divs that when clicked on would set the field.

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

      NVM. I simply looked at the documentation and was able to figure it out. Sorry, but Formik is a little intimidating. 😬

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

      Sorry I only saw your 2 comments now and I'm very happy you were able to fix it 😊😀😀
      Yeah, at the beginning it might be a bit scary, but after a while it becomes better, trust me 😀😀

  • @kevinrgt
    @kevinrgt 4 роки тому +2

    This helped me so much in a job interview. If I get that job I have you to thank. God bless you.

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +1

      That is soooooo good to read my friend!!!
      I'm very happy for you. The best of luck on the interviewing process =D
      Let me know when you have the results. I have my fingers crossed for you ;)

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

    Thank you so much! Bruno Antunes. This is just what I had been looking for and breaking my head over! That's a lot of time saved for me!!

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

      Great to hear it saved you time my friend! =D
      Thank you for the awesome feedback :)

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

    Wow, I came for some quick answers for but left as a better coder having a better grasp of creating custom wrappers and using types. Thank you!

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

    Super simple explanation and we need more React Js Examples Tutorials. Can we expect *React Form Hook* Tutorials?
    Thank you.

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +1

      I'm using both at the moment - for some reason my brain still prefer formik (probably because I'm using it for soooo long), but I can see clearly why someone would prefer form-hook.
      Someday in a not so distant future I'll drop a video using form-hook 😅😅

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

    Excellent! Just subscribed. Would love to see more videos on material-ui and react.

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

      Thank you 😍 I'll do material videos by the end of the year or worst case January 🙂 this last months have been very hard to find time to record, sorry 😔

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

    Finalmente, o mestre tá de volta!! Muito obrigado, vídeo incrível como sempre!

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +1

      😂😂 ahahah Muito Obrigado Rodolpho 😁😁
      Gostarias que eu fizesse algum video antes de iniciar (ou durante) a serie "React.js for beginners"? Todas as sugestões sao muito bem vindas 😍😍

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

      @@BrunoAntunesPT Seria sensacional!! Se puder fazer o React junto com o Typescript então, melhor ainda!!

  • @khandoor7228
    @khandoor7228 4 роки тому +2

    Bruno this is a great tutorial. I am studying all of these technologies and this video is exactly what I needed Thank you brother!!!

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +2

      Thank you, I'm glad it was helpful! 😊
      If you want more in-dept details about formik and yup, in this video description you can find a link to another video Formik+Yup video (ua-cam.com/video/kYyaJyTLjpk/v-deo.html).
      I hope you find that one useful 😍

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

    you are the best teacher on UA-cam coz you do your job with love.

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

      Thank you my friend ❤️❤️ i love what I do 😍😍

  • @_tonygaeta
    @_tonygaeta 2 роки тому +6

    This was a great walkthrough. Thank you for making this! Quick question. How would you handle the multi-step form if every field resided in its own component? Would you import the FormkiStep into each component? Looking at the code, it seems pretty straightforward when all of the form fields reside in the same file, but I'm not sure how to tackle this when I'm dealing with 12+ form fields all encapsulated in their own components.

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

    YOU ARE A LIFE SAVER, I managed to use the same method on React Native. Thank you very much.

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

      Awesomeeeeeeee 😍😍😎 One day I need to properly learn react native, but I'm very happy this worked there 😜😜

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

      @@BrunoAntunesPT I had to tweak many of it, But the general idea still implemented and worked just fine.

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

      That's still very good news 😅😅

  • @ibrahimhebish1404
    @ibrahimhebish1404 4 роки тому +4

    You did great job 👍 , you are talented instructor by the way 👍

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      Thank you very much Ibrahim ❤️ your comment made me feel incredibly happy 😊 thank you my friend ❤️❤️❤️

  • @oleksandr5128
    @oleksandr5128 4 роки тому +2

    I was not aware about YUP, thank you a lot! looks really good!

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +1

      Thank you very much my friend 😀😀😀

  • @surabhisugandh
    @surabhisugandh 4 роки тому +4

    Gosh! this was such a savior for me..thank you for taking the time to share :)

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      I'm happy I could help 😀 thank you Surabhi 😊

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

    Thank you Bruno, you are a very pleasant teacher to learn from.

  • @JoeBoo532
    @JoeBoo532 4 роки тому +1

    This video is gold!!! how have I not came across your channel before, I DONT KNOW! :D

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      Thank you 😍😍😍

    • @JoeBoo532
      @JoeBoo532 4 роки тому +1

      @@BrunoAntunesPT quick question, why did you pass onSubmit={async (values, helpers) ? i cantr see 'helpers' args being used anywhere? thank you again, Bruno :)

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +1

      It's just the signature of the function 🙂

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

    Such valuable information should be thanked! Great work Bruno

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

    Hi Bruno, thanks for your classes. I follow you and in Formik + MaterialUI it's very easy to learn from you. Best Regards !!

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

      Thank you Vittorio 😀 very happy to read that 😍

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

      @@BrunoAntunesPT I was working with formik-material-ui switch and in the new versione if the type is missing in the attribute it does not work, in the 3 major release. Thanks

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

      @@BrunoAntunesPT I follow you very often, Best Regards !!

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

      It's normal that from time to time things change a little bit
      that's actually very healthy, it means they are innovating and improving 😀

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

    exactly what I needed, great vid. subscribed

  • @AhsanKamal001
    @AhsanKamal001 4 роки тому +1

    I love your style of teaching. Thanks for the help

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +1

      Thank you for watching the video 😀😀

  • @attamjotsinghkhurana4473
    @attamjotsinghkhurana4473 4 роки тому +1

    Best formik video till date and very useful and informative video series 👍👍👍

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      So nice of you saying that! Thank you very very very much =D

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

    Thank you so much, i am stuck with these kin'a things

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

    Wow Bruno, this is awsome !! Thx for sharing those advanced contents :)

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

      Thank you Cedric, I'm very happy you found it helpful 😀😀

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

    Man I liked your way

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

    That was exactly what I needed.

  • @UsamaRashad-q7j
    @UsamaRashad-q7j 5 днів тому

    Very well explained. Thanks for making this video. May I ask how long it took you to get to this level of experience? Thanks

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

    your explanation is incredible

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

    It’s just brilliant!

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

    Hey Bruno, thanks for this video i learned lots from this video as beginners

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

      That's awesome to read, thank you very much ❤️

  • @bernardamofah4524
    @bernardamofah4524 4 роки тому +1

    Oh how i have been waiting. Super excited for this

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      😊😊😊😊
      This is the video you requested a while ago! I was about to say your name during the video, but I didn't knew if you would be upset if I mention you =D eheheh

    • @bernardamofah4524
      @bernardamofah4524 4 роки тому +1

      @@BrunoAntunesPT really appreciate that. it was great seeing how it can be done. Wondering whats next. Gonna keep using it (like the rest of your videos) as a reference

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      It was great fun creating this one =D
      Thank you very much for the suggestion =D

    • @bernardamofah4524
      @bernardamofah4524 4 роки тому +1

      @UCyU0mNYdX9EHY7rc5yucIZA u know the pick bit is that only for Typscript or can it be done using just JavaScript

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      Sorry I missed your comment =(
      Yes, in Typescript you quite a few nice helpers - I use Omit and Pick quite a lot =D

  • @MedyGames
    @MedyGames 4 роки тому +1

    Hello bruno , just a suggestion. Add the video playlist link to every video description ideally on the very top.
    Will probably also help with getting some more views . Greetings

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +1

      Thank you very very very much for the suggestion Medy 😍😍
      I'm really new to this youtube thing - Please, if you have more suggestions let me know. Tonight I'll update all the videos to have pointers to the playlist they belong to 😊😊

    • @MedyGames
      @MedyGames 4 роки тому +1

      ​@@BrunoAntunesPTure welcome.
      btw your diagrams are aweseome ;) to exlain the concepts.
      I can totally see your experience shining through making it easy for you explaining complex topics in a simple way.
      If you enjoy them. Maybe target some even more beginner topics with potential bigger reach... just a thought
      You could also split up some videos ... to have less intimidating video length ... 10 - 20 minutes ... though I feel like.. once more ppl know you this wont be an issue
      I clicked anyways^^ ...
      Authentication is currently nagging me abit.
      Im still lacking a broader view what to choose for authentication... it seems like any of that stuff has its flaws ...
      Im very interstied in this because I care about having at least basic security for when I built some stuff....
      . so as a beginner I would like to have " autetnication that isnt too hard to implement but for the most part safe"
      I found some basic aproaches here.
      But I still wonder if one should bother when there are options like firebase or strapi...
      In case you actually start building a real project. What would you pick for a small project .. and breath somewhat easy knowing that the next guy who just knows a tad about authentication cant crack open your system xD ? !
      So in a sense I want smth where you can say "this should be somewhat safe"... for my first projects xD
      Anyway Im excited to see more.
      Greetings

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      All your tips are amazing my friend!!! Thank you very very much, you are amazing ♥️
      Regarding authentication, in order to be easy, probably the best bet is to use passport with Facebook /Google/twitter autentication when possible. I have to prepare a video like that in the future. I think it will help people to have a secure and easy authentication system 😍😍😍
      Once again you are amazing my friend, thank you, thank you ♥️♥️

    • @MedyGames
      @MedyGames 4 роки тому +1

      ​@@BrunoAntunesPT Nah man you are amazing :D...
      My advice may not help much:D ... But mabye worth a try.
      A video to demontrate " what is a basic -/ secure" authetnication ... would be great.
      I mean for starters anything that works is fine .... but I have that little voice that is asking "but what if you app grows even a little " can I trust my own authentication or should I better trust google or firebase xD ...
      Greetings

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      Sorry Medy, for some reason I lost your comment =(
      Honestly lately I have been working quite a lot with auth providers like Facebook and Google. Looking into my analytics, I'm really really really tempted to completely remove my custom authentication system (almost nobody is creating accounts with email+password). I'll do some more analysis on this =D

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

    This is awesome, keep up the good work!!!

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

    This is really awesome man!
    Thank you so much for this, really helped me a lot!!

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

      Amazing 😀😀😀 thank you for the feedback my friend 😍

  • @changemaker2909
    @changemaker2909 4 роки тому +1

    Great .. please provide more project like this.Thank you

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      Thank you!! 😊
      I will bring more content like this in the future 😎😎

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

    hey bro, thanck you very much, amazing work

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

    Great tutorial. Learned lot. Thank you so much Bruno..

  • @UsmanKM
    @UsmanKM 4 роки тому +2

    Loved this tutorial. Can you show us how to introduce options between two textfields? Where the user can choose either a specific textfield or they can choose the other textfields to fill.

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +1

      Thank you my friend =)
      I don't know if I fully understood your example. If you can give me a practical example, probably it will be easier for me to understand =)

    • @UsmanKM
      @UsmanKM 4 роки тому +1

      @@BrunoAntunesPT imagine if there's a website which allows us to POST books. Imagine if we're trying to write a book from scratch. We have to give it a title for the first time. And then move on. But if we've already written somepart and then we're returning later on, so now we have to choose from the available books (so that we can carry on from where we left of) I hope I didn't make this more confusing 😅

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +1

      I think I got even more confused now 😅😅😅 probably because it's weekend and my brain is lazy 😂😂
      Do you have any application doing that? If you can send me the url I think it will be the easiest way for my lazy brain to understand it 😅😅

    • @UsmanKM
      @UsmanKM 4 роки тому

      @@BrunoAntunesPT okay so imagine if there's an option to either choose from an available list or add a new one to the list. The user can choose only one option. The one he chooses will change the state

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      Ahh you want some fields validating some other fields, cross-field validation?
      Can you just watch the first 35 seconds of this video to let me know if this is what you want? ua-cam.com/video/kYyaJyTLjpk/v-deo.html

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

    This was incredibly helpful. Thank you so much.

  • @AYUSHKUMAR-dn8sr
    @AYUSHKUMAR-dn8sr 3 роки тому +3

    Wow, that was exactly I was looking for, explanations were perfect. I need one suggestion is that how can I transform into jsx? I am new in react. :D

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 роки тому +7

      Thank you my friend 😍😍
      Yes, it's very possible to have just JavaScript without any TypeScript for this example!
      I created this codesandbox in pure JavaScript: codesandbox.io/s/dry-architecture-kfmd7?file=/src/pages/index.js
      Let me know if that is what you were looking for 😃😃

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

      If you are learning and you don't mind, I'll give you a tip 😃
      When you see any typescript code that you don't know how to convert into JavaScript, you can put it over here: tsplay.dev/oN5A9N
      One the left you can see my typescript code (from this video), on the right, the "converted" JavaScript code 😃

    • @AYUSHKUMAR-dn8sr
      @AYUSHKUMAR-dn8sr 3 роки тому +1

      @@BrunoAntunesPT Thanks a lot, much appreciated!! Can we validate the forms on each step ? Will breaking forms into for multiple step help?

    • @AYUSHKUMAR-dn8sr
      @AYUSHKUMAR-dn8sr 3 роки тому +1

      @@BrunoAntunesPT Will surely keep this in mind!! Thanks a lot!!

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

      Are you asking about having different components for each step?
      If that's the question, absolutely, it will make the code much easier to read 😀
      Regarding the validation we have validation per step. You can also have global validation but having it per step seems easier to read for me 😅
      Sorry if I misunderstood your question 😅😅😅

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

    thank you very much brother!!

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

    Cool video what keyboard do you use? it sounds so nice :D

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

      This one was recorded directly on my Dell XPS 15 laptop, no external keyboard 🙂

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

    Thank you Bruno, this video helped me so much. Thank You

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

      I'm very happy it was helpful 😀😀 thank you my friend 😍😍

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

    Superb tutorial Sir! 👏

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

    Superb!

  • @fatoskurtishi9132
    @fatoskurtishi9132 Рік тому

    ahhh Bruno, Bruno :) thank you

  • @MKlein-gf3zc
    @MKlein-gf3zc 3 роки тому +3

    Thanks Bruno! Amazing tutorial! I am just having an issue, that after the first step Formik sets all fields to touched, so if I have a few fields in the second step as soon as I write in one of them all the validations show up on the other fields, I assume since they are all touched. Any solution? thanks.

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

      Thank you very much =D
      Yes, did you check my repository?
      I did a commit at the time in the repository to fix that small issue that I missed while recording.
      The specific commit is this one: github.com/bmvantunes/youtube-2020-june-multi-step-form-formik/commit/c7924e8b7d80d24f7aa227cae1c52f554ff503a5
      Let me know if it fixes your issue :)

    • @MKlein-gf3zc
      @MKlein-gf3zc 3 роки тому +1

      @@BrunoAntunesPT Thanks! I didn't know you could use setTouched with an empty object to reset. I ended up using resetForm with the old values, but this is much better. Really appreciate your quick reply. subscribed!

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

      Thank you my friend 😀

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

    I appreciate your tutorial

  • @yousefahmed3249
    @yousefahmed3249 4 роки тому +2

    Hey Bruno, loved the video! Any chance a license (e.g. MIT) can be added to the github repo because I want to be respectful of your code and would like to use it for one of my projects! Thanks :)

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +1

      Thank you very much Yousef!!!
      Yes, of course!!! All my code is public and you can do what you want with it =D
      I added a License.MD (MIT) to my 2 last repositories =D
      If you want I can add it to any other repository =)

    • @yousefahmed3249
      @yousefahmed3249 4 роки тому +1

      Bruno Antunes Thank you so much Bruno!!! I also just subbed 👍🏼

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +1

      Double thank you, Yousef 😍😍

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

    thank you!

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

    Thank you, it was a very beautiful explanation

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

    Thank you! This was a rare video with grateful informations. I just have a question that how we use formik props like 'setFieldValue' or 'values' on parent. Forgive me for this question, since I am junior.

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

      I figured a way out but I didn't test it fully
      Wrapping FormikStep with FormikPropsProvider and passing props as function may work
      {(props)=> 'child components field etc'}
      {
      return React.createElement(
      FormikProvider,
      {
      value: formik,
      },
      children(formik)
      );
      });

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

      Thank you very much :D Sorry for the delay replying! I'm very happy you found a solution =D

  • @7h3mon
    @7h3mon 4 роки тому +1

    Great tutorial! THANKS!

  • @BRUNOMTR
    @BRUNOMTR 4 роки тому +2

    Obrigado, Bruno. Entendi perfeitamente. Abraços do Brasil.

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

      Muito obrigado Bruno 😁😁😁
      Um grande abraço deste Bruno Português 😄😄

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

      @@BrunoAntunesPT Sua explicação é realmente maravilhosa, parabéns pelo trabalho !

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

      Muito obrigado Arthur 😀😍😍

  • @filipkuszenin3649
    @filipkuszenin3649 4 роки тому +1

    Good job! Nice video!

  • @ДаниилКедров
    @ДаниилКедров 4 роки тому +2

    Hey, Bruno, thanks for the awesome video!!! I have a question. Can I pass the 'touched' and 'errors' props into ? I wish to define classNames in depend on 'touched' property, and then highlight the fields with errors.

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +1

      Thank you 😀
      Formik provides a hook called useFormikContext 😀
      I think that's all you need inside your formik step plus a render prop on the children of the formik step 😊

    • @ДаниилКедров
      @ДаниилКедров 4 роки тому +1

      @@BrunoAntunesPT thanks!

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

    If you have this class on udemy, I will definitely give u 5 stars.

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      Thank you Justin 😀
      Actually I have never used udemy xD

  • @ManuelPenaloza
    @ManuelPenaloza 4 роки тому +1

    pure gold, thx!

  • @LucianoSoares85
    @LucianoSoares85 4 роки тому +1

    Very usefull as always. Thanks.

  • @khizarhayat979
    @khizarhayat979 4 роки тому +1

    again well explained tutorial

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

    Thanks so much! The code is so nice and clean 🙏

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

    Hello Bruno, nice tuto. Thanks a lot. I would love to do the same in react or nextjs with tailwind css.

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

      Thank you 😀😀 that video might happen one day 😜😜
      But to be 100% transparent with you I dont have it planned for short term 😊

  • @sevenseven6123
    @sevenseven6123 4 роки тому +1

    Hey Bruno! Awesome tutorial, as always.
    I have one question:
    validationSchema={currentChild.props.validationSchema}
    is what you have written.
    currentChild has been typed like this: const currentChild = childrenArray[step] as React.ElementType;
    and FormikStepProps give access to the following properties:
    export interface FormikStepProps extends Pick {
    }
    So, my IDE complains on the first line of code I've written in this answer ( the validationSchema= ...) TS2339: Property 'props' does not exist on type 'ElementType'. Property 'props' does not exist on type '"symbol"'
    I really like the "Pick" variant, coz it helps other developers instantly knowing what they can access. So is there a way to keep it even when accessing props like this? Adding props to Pick defeats its whole purpose

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      Thank you my friend 😀😀
      I don't get any warning/error using vscode. Which editor/ide are you using?
      BTW executing "npm run build" do you get any error/warning? That is the "source of truth" 😊

    • @sevenseven6123
      @sevenseven6123 4 роки тому +1

      @@BrunoAntunesPT build fails because of this.
      I made a public repo for you to check it out: github.com/Leviathan91/Examples/tree/master/formik/formik-multistep
      I am using IntellIJ IDEA, because of the the java background / android programming I'd really like to keep it :)

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      I don't have access to a laptop right now, but looking into your code and mine you are using ElementType in the first 4 lines of FormikStepper and I'm using ReactElement.
      I'm almost sure if you change it to ReactElement instead of ElementType you'll solve the issue 😀
      Let me know if it worked out my friend 😍

  • @sergioterrazas97
    @sergioterrazas97 4 роки тому +1

    Hi Bruno! Great video, as usual!!
    I leave a request in case you need ideas: how to handle user authentication in the server side in order to avoid flickering.
    I currently use getserversideprops for each route that I want to "protect", but maybe you know of a better way :)

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      Thank you =D
      What do you mean by flickering? Flickering between you going to the login page and other pages? Or between normal pages?
      Sorry, I'm probably missing something :)

    • @sergioterrazas97
      @sergioterrazas97 4 роки тому +1

      @@BrunoAntunesPT Hi Bruno! Thanks for replying!!
      I'll try to explain myself better: if we have the "/signin" route and I am already signed in, If I don't use the getServerSideProps to know if the user is already logged in, the server will render the signin form, and when the client loads it will redirect or show something else like "you are already logged in", thus provoking the flickering.
      This would happen in all the user protected routes. Then the question is what would the better aproach/pattern to solve this problem about the logged in user.
      Thank you again for the answer and for all the videos, they are top-notch material!!!

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +1

      If you don't do anything server side (getServerSideProps or getInitialProps) and navigate to /signin you'll be shown that page.
      A few (milli)seconds later your javascript finishes downloading, parsing and runs....
      if you are not logged on nothing happens, but if you are already logged in it shows that message, hence you seeing the flickering. You saw signin page and now the new message.
      If you rely only on javascript client side you'll have that 😊

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

    This component is really awesome, but i has a problem. I need to access formik context for a depend select combos. For example, i have 3 levels, country, state and city, in each level i need to access my api to fill select combos. I dont know how to use handlechange (i am try handleblur) and i dont know how to use formik context to access country and state for fetch list of cities. Any help please.

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

      Thank you very much =D
      You are lucky today =D I already have a branch on that repository using the formik context, to show a full name on other step :)
      That branch is here: github.com/bmvantunes/youtube-2020-june-multi-step-form-formik/blob/940d2564ecf7ad60ed3dc497877bd2804c7c9b6c/src/pages/index.tsx#L167
      "The magic" happens in the last 10 lines of that file :)

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

      @@BrunoAntunesPT Really thank you very much. He didn't expect you to respond so quickly. Very thankful!!!

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

      I'm happy I could help 😍😍

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

    How we download pdf in same form

  • @stevereid636
    @stevereid636 4 роки тому +2

    Thank you Bruno! This was a great tutorial.
    One thing though, when I go to type in the first name field, I get the following warning in the console:
    Warning: A component is changing an uncontrolled input of type text to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component.
    Any idea what could be causing it?

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      Thank you Steve =D
      Usually what you are seeing is because you are setting the initialValues with undefined (or null).
      For example: will trigger the warning you are talking about. If you have you shouldn't see any warning/error.
      If you clone directly my repository, for example using codesandbox, you'll not get the warning :) ==> githubbox.com/bmvantunes/youtube-2020-june-multi-step-form-formik
      Let me know if this fixed it, otherwise it can be something else (if you can share the code you are doing, that will help as well) =D

    • @stevereid636
      @stevereid636 4 роки тому +1

      @@BrunoAntunesPT My initialValues looks exactly the same as yours 🤷🏾‍♂️
      I've put my code in a gist here: gist.github.com/Steve-Reid/9d3481e0c8b591a8065567e7448e51d8
      Thanks for your help 👍🏾

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +1

      I think I spot the error =D
      On line 41 where you have:
      name="firstname"
      change it to be:
      name="firstName"
      in the initialValues you have "firstName" (capitalized N) and in line 41 "firstname" (without N being capitalized) =)
      Give it a try and let me know if the error is gone =D

    • @stevereid636
      @stevereid636 4 роки тому +1

      @@BrunoAntunesPT Yep! That fixed it! You are the man! 🎉

  • @AdharshMk96
    @AdharshMk96 4 роки тому +1

    Hello Bruno, What is your opinion about react hook form ? I find it more satisfying, if you think its great tool and if it is convenient could you make one video on it ?

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +1

      I think they are really great libraries to work with forms.
      Currently I prefer to use formik, mainly because I'm used to it - this can change in a few months as I get more familiar with react hook form 😀
      This also means you can probably expect a video about it in the next 2/3 months as/if my opinion changes 😀

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

    Very helpful tutorial Bruno, thanks a million. I have a quick question, please can you share how to use useFormikContext to pass the touched and errors value to the FormikStep and how to access it in FormikStep. Thanks once again.

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

    bruno you are really amazing

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

      You are also amazing my friend ❤️❤️

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

    Great tutorial! However, how can i validate each step using server-side validation? For example, when i enter the email on the first step and i want to check if it already exists on the database.

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

      Thank you 😍
      You can have async validators with yup. Let me copy one of their documentation examples:
      // or make it async by returning a promise
      let asyncJimmySchema = string().test(
      'is-jimmy',
      '${path} is not Jimmy',
      async (value, testContext) => (await fetch('/is-jimmy/' + value)).responseText === 'true',
      });

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

    Hi Bruno, amazing video! Is it possibly to make it so that pressing the browser back button does the same as the back button on the form (if we somehow make steps have different URLs)? Or I can only show the users a popup so they confirm that they want to leave?

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

      Thank you 😍
      Yes, it's possible, you would would have to "connect" with your router system, which is a bit annoying, but possible 😊

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

      @@BrunoAntunesPT Thanks for the fast answer! Could you please lead me into the right direction with next router?

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

      I would do the following:
      1 - create a page: src/pages/my-page/[stepNumber].tsx
      2 - take advantage of shallow routing - nextjs.org/docs/routing/shallow-routing
      3 - every time you change step do something like router.push("/my-page/3", undefined, {shallow:true});
      I did an example using shallow in the car trader app video 4 that might be useful to understand the concept. Video playlist: ua-cam.com/play/PLYSZyzpwBEWTt-0uuxAcSrJmMlnD9Yuz3.html

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

      @@BrunoAntunesPT Thank you soo much!

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

    Pelo nome o cara deve ser Português, cara você acabou de me ajudar muito.... Valeu......

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

      Sou Português ❤️ muito obrigado Eládio 😊

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

    Hi Bruno, I am back here, I followed your NextJS tutorial last time ;) thank you. I am wondering if maybe it is feasible to have a table with search bars and filtering in one of the step ? or is it only for small forms ? thanks

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

      Thank you Marie 😀😀
      I don't see any performance problem with that approach as long as you have filtering and pagination server side 😊😊

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

      @@BrunoAntunesPT thank you !! yep I do. Thank you so much for your quick response :) last time you really helped us with next, my team and I scored a good grade at our coursework !! thank youuuu

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

      That's awesome 😀😀 I'm very happy you all were able to score a nice grade 😍😍
      Thank you soooo sooo much for letting me know that experience, it really makes me feel happy 😀

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

      @@BrunoAntunesPT :) One more question, sorry to spam you with question but I was wondering can I use Javascript instead of typescript ?

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

      No worries 😀
      Yes, you can use JavaScript, even though I would recommend TypeScript 😀😀😀
      If you want to see this video's code in JavaScript, please check this: tsplay.dev/oN5A9N
      PS - You can put any typescript code there, and it "gives" you the javascript code. I hope this helps 😀

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

    You are amazing my friend, this was really really helpful!
    I wanted to ask you if it is possible to add a custom onClick() listener to a formik field without overriding the default formik one?

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

      can I ask why you want to add an onclick? 🙂 Usually there are better ways than using onClick
      That being said, Formik doesn't use onclick. They use value, onchange, onblur etc, but no onclick 🙂
      So if you add an onclick you should be good 🙂

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

      @@BrunoAntunesPT I need to show a select component only when I click on a specific radio button and I thought if add an onclick function on the radio button that toggles the values of a certain state hook I can achieve that, you think there's an easier way?

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

      I had almost a book written here in the comments trying to explain why using an onclick in that scenario would be a bad idea, but then I decided to delete my gigantic comment and create a demo for you without the onclick =D
      The demo also does sanitization, meaning if you select an option in the dropdown and then select another option in the radio button, after you submit you end up with a value WITHOUT the dropdown value (if you don't like that, just delete the if inside the onSubmit). I think I put every single detail in this codesandbox and in the end it was faster than my "book" and hopefully gives you much more value than my "book" xD
      codesandbox.io/s/elated-shape-m681g?file=/src/App.js

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

      @@BrunoAntunesPT You are amazing my friend, this was very very helpful, thanks

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

      Happy I could help 🙂

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

    Hi Bruno, I heard in your videos that jss will be dismissed from material-ui for styling the pages. I understood that the jss will be replaced bt emotions ??? I'm not sure about what you said. Do you confirm that jss will be replaced by emotions ?? Thanks in advance

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

      Yes, by emotion 😊
      You can check the following two issues:
      github.com/mui-org/material-ui/issues/24405
      And
      github.com/mui-org/material-ui/issues/22342

  • @user-oj7ii7lz7j
    @user-oj7ii7lz7j 4 роки тому +1

    Hi. Will there be a video about NextJs with state manager? React Context or Redux? That would be great.

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +1

      Redux I'm no longer using it, so most probably there won't be a video about something I no longer recommend 😊
      Regarding context we might do one sooner or later 😉

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

    Hi! how are you?
    if you have a error when you submitting form and need back one step for modify one input, how to manage errors in this case? In my case, formik, show errors in inputs when back one step because formik change the values. I need help

  • @changemaker2909
    @changemaker2909 Рік тому

    How can I add Mui Autocomplete in this Multi-Step Form?

  • @benediktlantsoght1706
    @benediktlantsoght1706 4 роки тому +1

    Very nice!

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

    Olá Bruno Antunes, tenho uma dúvida e gostaria que você me ajudasse;
    Como eu faço para acessar as props do formik como isSubmitting, values, setFieldValue dentro dos formikSteps? Eu sou iniciante, e preciso construir um form e não estou sabendo como.

  • @yameenkhan7648
    @yameenkhan7648 Рік тому

    I have follow you code but not working FormikConfi and FormikValues

  • @FaizanKhan-ku8iu
    @FaizanKhan-ku8iu 4 роки тому +1

    This is very useful, can you please tell how can we use form values from steps ? For example, how first and last name from Form Fields can be used to show formatted Full Name in same form ?
    Regards.

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +1

      Thank you my friend =D
      I ended up coding one possible solution at github.com/bmvantunes/youtube-2020-june-multi-step-form-formik/commit/940d2564ecf7ad60ed3dc497877bd2804c7c9b6c
      Let me know if this is helpful - It shows on step 2 and 3 the message "Hello, {firstName} {lastName}!" =)
      PS - You have at least 2 other possible ways to implement this that will be cleaner in the long run, but this one is probably the simplest if you intend to use it only once or twice :)

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

    Hello, thanks for this tutorial
    Please what are the dependencies required? Thanks

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

      The GitHub URL is in the video description 🙂

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

    Is there a reason you are using component={TextField} instead of as={TextField} in this video?

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

      That's because we are using formik-material-ui 😃
      You can have a look into their documentation here: stackworx.github.io/formik-material-ui/docs/guide/getting-started

  • @Jahangirkhan-ig1wj
    @Jahangirkhan-ig1wj 4 роки тому +1

    Great video

  • @medusa121
    @medusa121 4 роки тому +1

    thank you so much! I think i miss the source code, the one in github is typescript and in next.js?

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      Thank you 😊
      At the end of each video I commit the code as is to github without any change 😊
      In the video description I always have the link to the repository, in this case from the video description:
      Github Repository: github.com/bmvantunes/youtube-2020-june-multi-step-form-formik
      I hope you find the code helpful/useful 😊

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому

      And yes the source code is in typescript 😊

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

    i think the techlead should see your form lol, hahaha

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

    awesome. Would you be able to show how to build a form with multiple sections (i.e a scrollable form)

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

      Thank you 😍
      Do you have any example of an application with those scrollable forms? I think I'm not familiar with that ux concept 😊

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

      @@BrunoAntunesPT here is an example: assets.littlerealestate.com.au/documents/NSW-Full-Tenancy-Application-Form-January-2017.pdf?mtime=20170130165210

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

      You want to be able to print it to a PDF and have one section per page? Sorry I'm a very confused right now 😅
      If you want to build the different sections on a page and allow them to grow as you add more, then you don't need to do anything, meaning no special code on your side for that to happen 😊

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

      @@BrunoAntunesPT to keep it simple, how to achieve the layout in page 2 of the pdf (Primary Contact) in Formik, which should be responsive. If we could push the form data to mongodb, that would be super cool.

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

      The layout is all css, zero to do with formik or any form library 😊

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

    I have a problem when I go back to a previous step , I lost the values that I made (only with checkbox field and autocomplete field)

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

      Without seeing your code I don't know what you are doing wrong 🙂 can you share your code? - for example a GitHub repository or a codesandbox 🙂

  • @amandeepkochhar574
    @amandeepkochhar574 5 місяців тому

    Please continue on youtube, I hope everything is alright. Did not saw you from a very long time Bruno?

  • @oosimaginary
    @oosimaginary 4 роки тому +1

    Hi Bruno. Thanks for the great video. I'm making a very similar project so I stumbled upon it and it really helped me. :) I was wondering if you could help with perhaps another video showing how to implement the formik-material-ui Lab Autocomplete component. I've got it implemented in my project and it is working visually, but i can't figure out how to make it update the formik values or maintain it's value in the UI as I navigate back and forth between page steps. Thanks!

    • @BrunoAntunesPT
      @BrunoAntunesPT  4 роки тому +2

      Thank you Sam 😍
      Thank you also for the suggestion I'll keep it in mind for future videos 😁😁

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

    Great video as always. I have one question, the validation on each step is great and working fine for UI side but how to deal with serverside validation which doesn't care about steps and only cares about whole form. For example, you submit to the server and it gives you error on field email as "Email already exists", and email field is in first step of our multi step form, how to locate to exactly that email field when there's an error from server side?

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

      Thank you my friend 😊
      In those cases I think async validation will help you for the email example 😊
      In case you don't want to use it, you have two options. Keep a map of what field is in what step and when you get errors go to that step (or the step of the first error)
      Some apps I also saw expanding all the steps into one when that happens, even tho, I don't love that 😅😅