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

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 พ.ย. 2024

ความคิดเห็น • 189

  • @YuriiKratser
    @YuriiKratser 3 ปีที่แล้ว +4

    I like your kindness and politeness.

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Thank you very much for your kind words ❤️

  • @tririfandani1876
    @tririfandani1876 3 ปีที่แล้ว +3

    Nice video Bruno 👍👍
    The combination between Formik + Yup is amazing.
    It makes validation feels like a breeze, while MaterialUI showing the errors in the UI.

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Thank you 😀😀
      I really love the combination of those 3 😍😍

  • @sergiob3698
    @sergiob3698 3 ปีที่แล้ว +2

    Hey bruno. Glad you are back online.
    This video is a must watch!.
    will do it soon hopefully!

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Awesome Sergio 😀
      Let me know your opinion after you watch it 😉😉

  • @vitorpereira316
    @vitorpereira316 3 ปีที่แล้ว +4

    Bruno, i don't have words to thank you enough! You helped me so much with this video alongside with the mult step form. Greeting from Brazil, muito obrigado!

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +1

      Muito obrigado meu irmão 😍 fico muito feliz dos meus vídeos estarem a ajudar 😀😀

  • @andreroodt4647
    @andreroodt4647 ปีที่แล้ว

    So glad I stumbled across this tutorial. Exactly what I needed, and as mentioned already, nice to see you using Typescript

  • @victorchidi9973
    @victorchidi9973 ปีที่แล้ว

    From your introduction, you just saved my day. Thanks Bruno

  • @Svish_
    @Svish_ 3 ปีที่แล้ว +4

    Love that you're doing these in Typescript, it makes it so much easier to use in actual projects! 💙
    Any chance of you making a tutorial on how to add custom validation methods/types to yup? For example date validation and credit card validation? Particularly how to make them "visible" to Typescript, so you can do value: string().required().creditCard() 🙏

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +1

      Thank you mate 😍😍 yeah I prefer to explain in typescript because that's what most people will use at work 😀 at least here in London 😊
      Yeah... I can do that video one day explaining how to add custom validators to yup using typescript 😊

  • @Pouetpouets
    @Pouetpouets 2 ปีที่แล้ว +1

    Bruno you deserve a part of my salary, you helped me so much with this

    • @BrunoAntunesPT
      @BrunoAntunesPT  2 ปีที่แล้ว

      I really appreciate your words my friend 😍 use the money for a good dinner or anything you like 😉😉

  • @sanjeewanayanananda9657
    @sanjeewanayanananda9657 6 หลายเดือนก่อน

    thank you very much Bruno. a very clear and fun tutorial. helped me a lot ❤

  • @eliastamerr
    @eliastamerr 3 ปีที่แล้ว +1

    Hello sir you dropped this 👑. I'm jumping between your formik videos and I must say you are amazing my friend.

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +1

      😍 you made my day worth it Elias ❤️ thank you very much my friend 😍
      PS - If there's any video you would love to see on the channel, let me know 😀😀

    • @eliastamerr
      @eliastamerr 3 ปีที่แล้ว +1

      ​@@BrunoAntunesPT Thank you my friend

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +1

      I think TH-cam deleted 3 comments from you 😔 I received 4 notifications but only see one comment 😔😔😔
      Regarding your question on this comment, you can put the state on react context 😀 if you have the luxury to have your component inside the form itself, then you just need to call that useFormikVontext hook 🙂
      if you have a repository I can look at, I can give you much more accurate recommendations based on your needs 😍

    • @eliastamerr
      @eliastamerr 3 ปีที่แล้ว

      @@BrunoAntunesPT Hi Bruno, whenever I post a link for my repository in the comments it gets deleted directly, my code basically looks exactly like the code you used for the FormikStepper and Multi-form, what I just need is to access the values of the form inside the FormikStep, I'm sorry I tried posting a link for my code here but it wouldn't work. (Ps: if possible I will need the solution without typescript) Thanks a million times king

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Yep, TH-cam for the last few weeks has been very "aggressive" blocking comments with external URLs :(
      Feel free to share the Link with me on Linkedin, because having a repository to work on, makes life a million times easier for me :)

  • @BBCLinar1994
    @BBCLinar1994 3 ปีที่แล้ว +1

    Thx, bro !
    I don’t know english good, but watching your videos and understanding all themes.

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Glad to hear that! Thank you 😊

  • @saisagarsharma
    @saisagarsharma 3 ปีที่แล้ว +2

    I generally dont comment much. Thanks Bruno. Much needed knowledge for me; Keep gng. u got a new sub

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Woooow!!! 😍😍😍😍
      Thank you sooo much Sai ☺️☺️☺️ I hope you enjoy the other videos on the channel 😀

    • @saisagarsharma
      @saisagarsharma 3 ปีที่แล้ว +1

      @@BrunoAntunesPT sure Bruno

    • @saisagarsharma
      @saisagarsharma 3 ปีที่แล้ว

      Hi Bruno, Is there a way to show a text field based on validation of another field. For ex: if a text field which takes amount crosses certain limit, i need to show a text area for the reason. Any help would be grateful, thanks in advance

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      I have exactly what you need in this video between a checkbox and a textfield 😉 th-cam.com/video/l3NEC4McW3g/w-d-xo.html
      Then the only thing missing is a ternary for the hide and show of the amount of money text field:
      {erros.amount? : null} 😊😊
      Let me know if that answers your question 😀😀

    • @saisagarsharma
      @saisagarsharma 3 ปีที่แล้ว +1

      @@BrunoAntunesPT _/\_ Thankyou so much

  • @ibrahim_youssef_13.12
    @ibrahim_youssef_13.12 2 ปีที่แล้ว

    really you are cheerful and beneficial guy, (LOVE YOUR VIDEO) , many thanks

  • @emanuelavram2513
    @emanuelavram2513 2 ปีที่แล้ว

    I feel like i have no clue about react when i see your Videos :'D
    You're great and very experienced!

    • @BrunoAntunesPT
      @BrunoAntunesPT  2 ปีที่แล้ว

      Thank you very much ❤️ I'm still bad in a ton of stuff 😅😅😅 the goal is to improve everyday on something 😍

  • @0xPanda1
    @0xPanda1 3 ปีที่แล้ว +1

    Bruno, i find your videos very helpful and very well explained💙 thanks u a lot

  • @brightertomorrow3343
    @brightertomorrow3343 3 ปีที่แล้ว +1

    Wow!!! One of the greatest tutorial....

  • @saidmuhammadkhatami3866
    @saidmuhammadkhatami3866 3 ปีที่แล้ว +1

    Terima kasih sangat membantu , im from indonesia your amazing bro

  • @rafaborowski2323
    @rafaborowski2323 3 ปีที่แล้ว +1

    you make a huge contribution to my programming learning. thank you

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      I'm soo happy reading your comment Rafal 😀😀😍😍😍
      It was to help people that I created this channel, so your comment makes me feel fulfilled 😍
      Thank you for your words Rafal 😀

  • @Yankzy
    @Yankzy 3 ปีที่แล้ว

    So genuine feedback, I try your methods from two of your videos and I always run into errors I have no idea how to solves, turns out you are using typescript, I don't think most of your audience will be using typescript. May want to consider that. Gave you a thumbs up though.

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Thank you for the feedback and the thumbs up my friend. I understand your point, completely! :)
      The thing is that where I live (London, UK) most companies nowadays have typescript as one of their requirements. That's the reason I use typescript on my videos to help people over here :)
      What errors are you getting on this video (or previous videos) because it's in typescript? I can help you convert it into JavaScript :)
      PS - You can drop the TypeScript in this playground and on the right side you'll get JavaScript: tsplay.dev/oN5A9N

  • @rohantongle155
    @rohantongle155 3 ปีที่แล้ว +2

    Another nice video of react and formik.

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +1

      I'm glad you enjoyed it my friend 😀😀
      I'm thinking about also doing a multi file upload soonish, but not sure if it's something people need/want 😅😅😅

    • @rohantongle155
      @rohantongle155 3 ปีที่แล้ว +1

      @@BrunoAntunesPT ya i need the multi file upload tutorial.

  • @rachmanjk
    @rachmanjk 3 ปีที่แล้ว +1

    Thanks Bruno for the video, love it !!

  • @fcphsd
    @fcphsd 3 ปีที่แล้ว +6

    You're amazing my friend

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      😍😍😍 You are amazing David!!!! ❤️
      Thank you very very much 😀😀

  • @jhonatas54
    @jhonatas54 2 ปีที่แล้ว +1

    excelent video, so usefull end very complete.
    congratulations!

  • @sashamatveychuk1829
    @sashamatveychuk1829 3 ปีที่แล้ว +1

    Really great and helpful video! Thanks a lot! Solved all my problems :)

  • @CodingNuggets
    @CodingNuggets 3 ปีที่แล้ว +2

    Bruno, your videos are always so informative. Thanks for the content! Would love to see more from more often. See you soon!

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +1

      Thank you very much for your words 😍
      I'll try to soonish make a video about multi file uploads, not sure if it's something people want to see. What do you think? 😀

  • @manojthapa1641
    @manojthapa1641 3 ปีที่แล้ว +1

    bruno is back. great lesson as always

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Thank you very much Manoj 😀😀 I think I'll prepare a multi file upload next, not sure yet if people want it or not 😅😊

    • @manojthapa1641
      @manojthapa1641 3 ปีที่แล้ว +1

      @@BrunoAntunesPT i would love it, since you do it different than everybody else. By the way why did u deserted the react course ?

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +1

      Awesome I will prepare a multi file upload then 😀😀
      Well I didn't just desert that series I deserted TH-cam completely for like 2 months. Slowly, as things improve in my life I will come back to TH-cam progressively 😊😊
      this video is part of that react series, one of the last planned videos there 😊 one day I need to do more videos there for initial topics tho 😊

  • @cradleofkaschenko2057
    @cradleofkaschenko2057 3 ปีที่แล้ว +1

    Amazing tutorial! Thank you very much!

  • @doloreslopezjoffre7364
    @doloreslopezjoffre7364 3 ปีที่แล้ว +1

    You are great dude!!! Thanks

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      You are great too 😊😊 thank you 😍

  • @cheattube
    @cheattube 3 ปีที่แล้ว +3

    Thanks Bruno ? great teacher : good accent :)

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +2

      Thank you my friend 😀😀 to be honest I personally don't like my accent or my voice ahahah 😅😅😅

    • @governordog
      @governordog 3 ปีที่แล้ว +2

      @@BrunoAntunesPT I'm from the US and I absolutely love your voice

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Thank you Noah 😀😀 it's sooo nice to read those words coming from a native speaker ❤️❤️
      Thank you very very much for the confidence you gave me 😀😀

  • @mikestanley18
    @mikestanley18 3 ปีที่แล้ว +1

    Hii Bruno, have been watching your tutorials for quite some time now and I love the way you explain and make it so easy.
    I followed along with your formik multi-step and field-array tutorials and they worked great. However, when I'm trying to combine both in one of my projects it's throwing errors. Now, I understand what's wrong with the code but do not know how to solve it.
    In the field-array project we can destructure {values, errors, isSubmitting} before starting the component. But what do we need to do when we have to implement field-array in a multi-step form ?

    • @harshrajsingh6472
      @harshrajsingh6472 3 ปีที่แล้ว +1

      Right below the FieldArray opening tag we pass arrayhelpers ex:- {push, remove} . Along with these we also need to pass form prop so now, it will become {push, remove, form} and then use {form.values.fieldname.map()} etc inside the fieldarray and it will work.

  • @nedimkulovac6394
    @nedimkulovac6394 3 ปีที่แล้ว +1

    Hey Bruno! Welcome back :)

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Thank you Nedim 😀😀😀😍😍

  • @aimeegtz93
    @aimeegtz93 2 ปีที่แล้ว

    Hello Bruno !!
    I'm looking documentaion to create a map inside another map with Formik, do you have any idea?

  • @danielaraujo2036
    @danielaraujo2036 3 ปีที่แล้ว +2

    Adoro seus conteúdos !!! Parabéns.

  • @JulioMendez
    @JulioMendez 3 ปีที่แล้ว +1

    Hello Bruno, nice work man!, I'm currently watching your next js series. I have a question for you, do you feel like switching to React Hook Forms? I was using Formik in a really long 12 step form (60+ fields) and it was really really slow. I tried to optimize with FastField but I found that FastField was not working. Have you faced this kind of problem with Formik?

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +1

      Thank you Julio 😍
      I'll be 100% honest with you. The main reason I don't change to react-hook-form is mainly because of their breaking changes from release to release which are quite hard to apply in applications with thousands of components 😅😅 This one is only a few days old: react-hook-form.com/migrate-v6-to-v7/
      If your application is small, that is not a big deal, but when you have multiple applications built by 20/30 people, coding everyday for the last 2/3 years, those called "small breaking changes" become a bit harder to manage... not impossible by any means, but annoying 😅😅
      Don't get me wrong, react-hoook-form is amazing, but Formik has never failed me in very important applications. Also it has been without breaking changes "since forever", so for the applications that make me money, I prefer to keep them on Formik for my peace of mind and as I said before, it has never failed me on important moments 😃
      I have a few applications on react-hook-form, but...for some reason my brain still feels more comfortable and easier with Formik --- time may change my thinking tho, but for now that's how I feel 😅
      PS - Regarding having 60 fields in a form, I think my Designers/UX would "kill me" even before I notice any performance problem 😂😂

    • @JulioMendez
      @JulioMendez 3 ปีที่แล้ว +1

      @@BrunoAntunesPT thanks a lot for your answer! It helps a lot and I'll take your approach on this. Thanks man.
      And yes, it was 60+fields (many of them could be added dynamically). Sometimes client is a bit too much persistent 😅. But it's ok now, that project ended up well and I'm looking forward to Next js

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +1

      I already promised in the comments to other people, if I ever start to feel better while using react hook form, I'll make a tutorial about it.
      BUT I'll not do a tutorial about it while I don't move my main apps migrated into it 😅
      basically if I don't use it where I make money (my main apps), I'll not create a tutorial just for the views that it could bring to the channel 😊

    • @JulioMendez
      @JulioMendez 3 ปีที่แล้ว +1

      @@BrunoAntunesPT you are an inspiration man! Thanks a lot

  • @galex23032
    @galex23032 3 ปีที่แล้ว +1

    Great tutorial

  • @ВладиславКоцур-ж9з
    @ВладиславКоцур-ж9з 3 ปีที่แล้ว +1

    Thank you so much for your video!

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Thank you my friend 😍😍😍

  • @ArjunanE-y8v
    @ArjunanE-y8v ปีที่แล้ว

    Talaivarae You are greattttttttttttttttt...................thanks for your Video...............................................

  • @elisson357
    @elisson357 3 ปีที่แล้ว +1

    Thanks for sharing this.

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      You are welcome my friend. Thank you for watching 😊

  • @waynehuang736
    @waynehuang736 3 ปีที่แล้ว +1

    Hello Bruno! Great tutorial as always!
    I played around with adding lots of donation elements and when I start typing in the institution or donation amounts it starts to lag and get a bit slow during development. I can imagine for a larger application with many more fields and field arrays it will be very laggy. Have you experienced this before?

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +1

      Thank you =D
      Well... Formik is known to be a bit slow when you have many Fields on the screen (sadly).
      They have an optimization called FastField: formik.org/docs/api/fastfield
      From their docs: is an optimized version of meant to be used on large forms (~30+ fields) or when a field has very expensive validation requirements. has the same exact API as , but implements shouldComponentUpdate() internally to block all additional re-renders unless there are direct updates to the 's relevant parts/slice of Formik state.
      I have one of my applications that needed lots of fields using react-hook-form, but I honestly prefer the formik API, so I'm debating with myself for like 1 year if I should move to react-hook-form or not xD

    • @waynehuang736
      @waynehuang736 3 ปีที่แล้ว

      @@BrunoAntunesPT Thanks for your reply! In terms of performance is react-hook-form better?

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +1

      If you have 10 or 20 fields, for your users is not noticeable.
      If you have 20 or 30 fields, depending on their device power you might start to notice some difference 🙂
      In the react hook form docs page they have a comparison with formik and the re-renders from each library 🙂

  • @micharozek3046
    @micharozek3046 2 ปีที่แล้ว

    Hey Bruno! Thanks for the video, really helpfull. Can you tell me what is the name of this extension for importing? Looks really nice. Cheers!

    • @BrunoAntunesPT
      @BrunoAntunesPT  2 ปีที่แล้ว

      I have no extensions installed on my videos (apart from prettier)
      You can do Control + . or if on Mac Command + .

  • @khalidrequester4521
    @khalidrequester4521 3 ปีที่แล้ว +1

    Your videos are always so informative.I have 2 questions, first :how can I show error message if user leave the array empty ? second question : how can I created one big form contains subform which contains save button , how can I handle this . Thank you.

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Thank you =D
      We are already showing an error message when the user leaves the array empty. If you delete the current donation I show the message "You need to provide at least 1 institution" :)
      You can check the codesandbox for this video here: codesandbox.io/s/goofy-volhard-yru1w?file=/src/pages/index.tsx
      Let me know if that helped :)

  • @Mgsaraujo
    @Mgsaraujo ปีที่แล้ว

    Olá Bruno, muito bom o contúdo, parabéns e obrigado
    Eu tenho um cenário, onde por exemplo, as doações não podem ser repetidas e eu preciso apontar qual campo está repetido... daria pra fazer isso? como faria?
    Abs.

  • @sujithsundarbe4190
    @sujithsundarbe4190 ปีที่แล้ว

    hey thanks a lot man u saved me ...🤩🙏🙌

  • @integrateeverything
    @integrateeverything ปีที่แล้ว

    How to perform edit operation in formik , if if we have object inside array and want to rename value of one key

  • @tabbaking
    @tabbaking 3 ปีที่แล้ว

    Hello, what about the type="file"? Do you have a example of this using the FieldArray?

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Yes 😅
      th-cam.com/video/MAw0lQKqjRA/w-d-xo.html

    • @tabbaking
      @tabbaking 3 ปีที่แล้ว +1

      @@BrunoAntunesPT I love you!

  • @novakdan5
    @novakdan5 3 ปีที่แล้ว +1

    Does anybody else have a problem with/solution to a TS error concerning the yup test method? "Argument of type '(donations: Array) => true | ValidationError' is not assignable to parameter of type 'TestOptions'.
    Property 'test' is missing in type '(donations: Array) => true | ValidationError' but required in type 'TestOptions'". Thank you! And Bruno, you've got a talent, you can teach very well. :)

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Thank you very much Dan, I really appreciate it 😀😀😍
      I cloned my repository and I don't see any warnings on "npm run build".
      Can you share your code to see that typescript error/warning? 😀
      PS - In doubt, I also updated all the npm dependencies (just to double check), but I still don't see any error when I build. My GitHub repository in case you want to check - github.com/bmvantunes/youtube-2021-jan-field-array-formik

    • @novakdan5
      @novakdan5 3 ปีที่แล้ว

      @@BrunoAntunesPT I updated the deps according to your repo, restarted the TS server, restarted the project and the error is a bit different now, but still is there nonetheless.
      And the code is exactly the same as in your repo, I copied yours to try and see where the error is. "....test((donations: Array) => {..."
      "No overload matches this call.
      Overload 1 of 4, '(options: TestConfig): OptionalArraySchema', gave the following error.
      Argument of type '(donations: Array) => true | ValidationError' is not assignable to parameter of type 'TestConfig'.
      Property 'test' is missing in type '(donations: Array) => true | ValidationError' but required in type 'TestConfig'.
      Overload 2 of 4, '(test: TestFunction): OptionalArraySchema', gave the following error.
      Argument of type '(donations: Array) => true | ValidationError' is not assignable to parameter of type 'TestFunction'.
      Types of parameters 'donations' and 'value' are incompatible.
      Type 'TypeOfShape[] | undefined' is not assignable to type '{ percentage: number; }[]'.
      Type 'undefined' is not assignable to type '{ percentage: number; }[]'"
      The only difference between our projects are that I don't use next and have more packages included.

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Can you share your repository?
      Without running it myself is impossible to know what's going on 😅😅

    • @novakdan5
      @novakdan5 3 ปีที่แล้ว +1

      @@BrunoAntunesPT I put it to a codesandbox here codesandbox.io/s/loving-breeze-kc95i?file=/src/FieldArrayDemo.tsx
      The TS error looks exactly the same. Thanks for your help. :)

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      With code it's always easier 😀
      Fixed: codesandbox.io/s/suspicious-kowalevski-fr9o4?file=/src/FieldArrayDemo.tsx
      Basically you are using strict:true (which is good) and next by default uses strict:false. Now the code is fixed to work with strict:true even on my repository:
      github.com/bmvantunes/youtube-2021-jan-field-array-formik/commit/ab924f3f5ab7b0c68a6c938b91dca713829a2b05
      Thanks for this 😀

  • @ntrpause
    @ntrpause ปีที่แล้ว

    Great video thanks

  • @nayri_b
    @nayri_b 3 ปีที่แล้ว

    Great tutorial but I have a problem same as that, about updating the data. Like the user is going to update the stored data and he/she wants to add/delete a the dynamic form? Thank you in advance for your advice

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Sorry, but I don't understand what you want to achieve 😊
      Do you want do delete all the fields? If that's the question, you can delete them all by clicking on delete until there are no fields left on the screen - but probably this is not what you asked 😔

    • @nayri_b
      @nayri_b 3 ปีที่แล้ว

      😅 Sorry for not elaborating properly. What I mean is like when creating CRUD with the same kind of approach based on your tutorial. How can a user update the data using that form because I'm kind of using your approach to one of my projects, but unfortunately, I'm having a hard time, dealing with UPDATE like updating the data that has been created with those dynamic fields. How can I update my data in the dynamic fields to add more or delete one. I hope you understand the explanation 😅 I'm not that good in elaborating.

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +1

      On the UI or in your database?
      If it's on UI, formik has a property to reinitialize the properties based on the initialValues changing: formik.org/docs/api/formik#enablereinitialize-boolean

    • @nayri_b
      @nayri_b 3 ปีที่แล้ว +1

      Thanks man, such great help. Thank you for your response ☺️

  • @honeypatre
    @honeypatre 3 ปีที่แล้ว +1

    I have a doubt, what if I delete (click on delete) after refresh, so there won't be any field left right, to get the page to normal we will have to refresh and that won't be a good practice right. Kindly help me with that. Apart from that, the video is very very informative and I found it just in time as I needed this thing for my college project. Thank you so much!!!

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +1

      Thank you very much for your kind words 😊
      We have a button to "delete" each row and another one to "add donation" globally at the bottom, so no need to refresh the page 😊
      The "add donations" is always visible, so at any point in time you can add one more donation, even if you have none on the screen 😉

    • @honeypatre
      @honeypatre 3 ปีที่แล้ว +1

      @@BrunoAntunesPT Ohh right, that was simple, OMG. Thank you so much for replying. Love from India

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +2

      You are very welcome 😊
      Love to India from my tinny London apartment 😀😀😀😀

  • @eduardochavez4810
    @eduardochavez4810 3 ปีที่แล้ว +1

    Hi Bruno, I hope a video for MUI v5, thanks for your content

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      I'm migrating a very large application to material UI 5 (from material 4). When that migration is over I'll do a video showing all the pain points I faced (or at least the most common ones 😅)

  • @mohamedyoussef8835
    @mohamedyoussef8835 2 ปีที่แล้ว

    Awesome video ++++++ 😃

  • @rjgupta2849
    @rjgupta2849 2 ปีที่แล้ว +1

    Sir Great Explanation
    Love From India
    btw sir im getting an error "'FieldArray' cannot be used as a JSX component."
    can you please help me...

  • @damiangilz
    @damiangilz 3 ปีที่แล้ว

    Question. How can I validate lazily until I hit submit, so I don't get some errors when I start to type?

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +1

      You want to add validateOnBlur to your formik component 😀
      formik.org/docs/guides/validation#when-does-validation-run

  • @xhaimraez4227
    @xhaimraez4227 3 ปีที่แล้ว

    great! anyway, do you have idea how to insert the values into sql database? i'm using node js and async await but doesn't work well. only the first values are inserted to database row

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Thank you 😊
      What are you using to connect with your database?
      Raw SQL?
      Prisma?
      TypeORM?
      Something else?

    • @xhaimraez4227
      @xhaimraez4227 3 ปีที่แล้ว

      @@BrunoAntunesPT mssql. i dont have idea on how to insert loop in backend code

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      @@xhaimraez4227 is your code open source? Can you send the repository?

    • @xhaimraez4227
      @xhaimraez4227 3 ปีที่แล้ว +1

      @@BrunoAntunesPT good news! I already found a solution 😆 very thanks for your concern 😍

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +1

      That's very good news, congratulations 😊😊🎉

  • @cw9214
    @cw9214 2 ปีที่แล้ว

    Can a object array that is selected on a Typeahead be saved to Formik Array. If so, how?

    • @BrunoAntunesPT
      @BrunoAntunesPT  2 ปีที่แล้ว

      That's exactly what we did in this video. We have an array of objects with 2 properties (institution and percentage ). The only difference is that we don't use a typeahead, but that is a visual component, formik doesn't care if it's typeahead or not 🙂

  • @nartaryt
    @nartaryt 3 ปีที่แล้ว +1

    Love it

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Thank you my friend ❤️❤️❤️

  • @RakeshKumar-zj4hu
    @RakeshKumar-zj4hu 3 ปีที่แล้ว

    I need to notify youtube that why i get notification a week later!! I just refactored a lot of code yesterday moving from react-hook-form and yup to formik, formik-material-ui and yup. I was really finding difficult to register form elements from mui dialog, spent 2-3 days trying to figure out. In one day refactored all my code to formik, formik-material-ui and yup, and it was a breezer. Did you ever try React-hook-form? They claim a lot about number of renders, which i also saw while console.log. What is your opinion?

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Yeah TH-cam notifications sometimes are a bit weird 😅😅😅
      I have tried react form hook in the past and I like the idea and everything. But for some reason (probably because I'm used to it) I still prefer formik for complex form structures 😊
      In the end we should use what we feel gives us the best developer experience without sacrificing performance ❤️

    • @RakeshKumar-zj4hu
      @RakeshKumar-zj4hu 3 ปีที่แล้ว

      @@BrunoAntunesPT My friend after all refactoring I'm really struggling with just one thing. I'm using Select from formik-material-ui and want to have outlined. Not able to get the style correct at all. :( Pls help. codesandbox.io/s/falling-sound-u8ftf?file=/src/App.js

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Have you check this page? stackworx.github.io/formik-material-ui/docs/guide/faq#manually-bind-the-error

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Is this what you wanted? =D
      codesandbox.io/s/exciting-microservice-pp79e?file=/src/App.js

    • @RakeshKumar-zj4hu
      @RakeshKumar-zj4hu 3 ปีที่แล้ว

      @@BrunoAntunesPT : you can see the styling issue on the label. Tried all my luck to fix it, absolute failure.

  • @saisagarsharma
    @saisagarsharma 3 ปีที่แล้ว

    Hi Bruno, Can we add validations for dynamically added fields. Like, if i get fields that needs to be validated from API, can we add them to schema on runtime? Thanks in advance

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      The validationSchema is a prop like any other 😊 you can change it at runtime without any problem
      Regarding validating fields with an api call you can check the async validation section here: formik.org/docs/guides/validation
      Let me know if that helped 😊

    • @saisagarsharma
      @saisagarsharma 3 ปีที่แล้ว

      @@BrunoAntunesPT Thanks bruno. Can we get validation fields and validations over the api. Is that possible? Like a name field has "Required" , "min-length","max-length" etc over the api

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Yes, it's possible both ways 😊
      You can receive the type of validation (required, etc) and create the validation schema based on that
      OR
      You can validate directly in the api via the method I sent in the previous comment 😊

    • @saisagarsharma
      @saisagarsharma 3 ปีที่แล้ว

      @@BrunoAntunesPT can u pls help with the api body. how it look like. or any resource. i have too many things in the etc u said. 😀

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      In reality you can send any API body you want, what matters is what you return from the validate function 😊
      Open this URL and go to the section called "// Async Validation" - formik.org/docs/guides/validation and you'll see something like this:
      ```
      // Async Validation
      const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
      const validate = (values, props /* only available when using withFormik */) => {
      return sleep(2000).then(() => {
      const errors = {};
      if (['admin', 'null', 'god'].includes(values.username)) {
      errors.username = 'Nice try';
      }
      // ...
      return errors;
      });
      };
      ```
      As we can see in that example, you need to send an object with key/value pairs. The key is the name of your field that failed validation, the value can be a string, for example.
      For example, if you want to fail the field "age" and "country" you can return on validate something like { age: "You need to be at least 18 years old", country: "Your country is not acccepted" }
      If you send an object like that in your validate function, formik will mark those 2 fields as "errors"/"failed validation".
      I hope this helps 😀

  • @shoty1010
    @shoty1010 2 ปีที่แล้ว

    Hi video was great.. Thank you.. Can you or anyone tell how to access the parent object value inside the validation of field array fields.

  • @MarinYehor
    @MarinYehor 3 ปีที่แล้ว +1

    Hi Bruno, some time is gone, when we had chated. I've already found a job for junior position, I want to wish all world's goods for your soul, you are the one who was staying with me while I was going to this moment :) What about ant design, it would be great if you showed good practice with its form items, controlling, tables and etc. Material also cool, but with estimation on tasks at the job don't have enough time for practicing, after job I'm watching videos about indonesian islands and choosing on which island i want to go in nearest future😅😂

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +1

      Congratulations my friend 🎉🎉🎉
      I'm very very happy for you, I'm sure you'll do very well on your new adventure 😀😀 please keep me posted ❤️❤️
      Regarding Ant, I used it for a while, but I still prefer to use material and for some apps tailwind 😅😅

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      I hope we can go back to normal and visit those wonderful islands, we might even do it together one day 😍😍

    • @MarinYehor
      @MarinYehor 3 ปีที่แล้ว +1

      @@BrunoAntunesPT haha, you know, it would be so unrealisic for me :) I will write you when I will be prepared for the trip😉

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      I'll be waiting for that invite 😀😀 and between now and that invite, keep me posted on all your success my friend ❤️❤️

    • @MarinYehor
      @MarinYehor 3 ปีที่แล้ว +1

      @@BrunoAntunesPT of course, thanks and bless you😉

  • @sundeeppeethala312
    @sundeeppeethala312 3 ปีที่แล้ว +1

    Hi, Do you Have any Course on React with Typescript???
    As Typescript is growing more and more day by day, Each and every Company Asking REACT with Typescript Combination..
    Can you please Release and End to end Course on React, Redux with Typescript please..

    • @sundeeppeethala312
      @sundeeppeethala312 3 ปีที่แล้ว

      Do you have any Course on React , Redux with Typescript??

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      I have a light introduction to typescript that you might find useful: th-cam.com/video/0cXccUew19k/w-d-xo.html
      I might in the future make a deeper video taking that video as a starting point 😊

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      Regarding redux, I don't use or recommend redux anymore 😅😅
      PS - I was a very big supporter of redux until like 2 years ago 😅

  • @amnpsharma
    @amnpsharma 3 ปีที่แล้ว

    how can i use material ui switch and select with formik fieldArray

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +1

      For the switch you have stackworx.github.io/formik-material-ui/docs/api/material-ui#switch
      For the select stackworx.github.io/formik-material-ui/docs/api/material-ui#select
      Let me know if that's what you were looking for 🙂

  • @jeromesnail
    @jeromesnail 3 ปีที่แล้ว +4

    "My name alone is bigger than 10 characters". Portuguese problem 😁

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว +1

      Ahahahah very true 😀 our names in general are gigantic 😅😅😅
      My mother's full name is exactly 50chars (counting with spaces) 😅😅😅

  • @patrickck8185
    @patrickck8185 3 ปีที่แล้ว

    Hi,
    if anyone can help me with this.. gotta make a SinglePageApplication, a simple sign up form, the screens required are:
    step 1 - asking for users name and phone number
    step 2 - asking for users email and data of births
    step 3 - should present all the users details for confirmation
    step 4 - sign up completion screen
    not sure how to solve the transition from 1st to 2nd step. also, if I have to use session or local storage to present users details on step 3..

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      You can use something similar to this for your steps: th-cam.com/video/l3NEC4McW3g/w-d-xo.html 😊

  • @ROCKSDOT
    @ROCKSDOT 2 ปีที่แล้ว +1

    Super Super Super

    • @BrunoAntunesPT
      @BrunoAntunesPT  2 ปีที่แล้ว

      Thank you =D

    • @ROCKSDOT
      @ROCKSDOT 2 ปีที่แล้ว

      @@BrunoAntunesPT can you please also make a tutorial for dynamic dependent dropdown using field array ?

  • @Mustafa-vi7em
    @Mustafa-vi7em ปีที่แล้ว

    ty

  • @programmer4047
    @programmer4047 3 ปีที่แล้ว +2

    Please! Make a tutorial on C# ASP.NET

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      I love c#, but at this stage I'm a bit away from it - I might come back one day 😊
      PS - To be absolutely honest with you I'm still missing my good old entity framework, an amazing orm with great migrations 😀😀😀

  • @arunkumar2786
    @arunkumar2786 3 ปีที่แล้ว +1

    Bro why u take one month time to make new video
    I'm waiting for your video:)

    • @BrunoAntunesPT
      @BrunoAntunesPT  3 ปีที่แล้ว

      I'm very happy you missed me 😅😅❤️❤️ and sorry for the lack of videos, I know I was a month away.
      The truth is that since lockdowns started in London it has been very hard for me to conciliate TH-cam with my family and work... Hopefully I'll learn how to do that soon ❤️❤️

    • @arunkumar2786
      @arunkumar2786 3 ปีที่แล้ว +1

      @@BrunoAntunesPT it's ok

  • @kevyyar
    @kevyyar 2 ปีที่แล้ว

    Do this in react hook form!

  • @Pedro-gu7jj
    @Pedro-gu7jj 11 หลายเดือนก่อน

    Você é brasileiro?