React Hooks useContext Tutorial (Storing a User)

Поделиться
HTML-код
  • Опубликовано: 4 июл 2024
  • Learn how to use the useContext hook in React to store and access a user.
    Code: github.com/benawad/react-hook...
    Playlist: • React Hooks Tutorial
    ----
    If you like cooking, checkout my side project: www.mysaffronapp.com/
    ----
    Join the Discord: / discord
    ----
    Patreon: / benawad
    ----
    Follow Me Online Here:
    Twitch: / benawad
    GitHub: github.com/benawad
    LinkedIn: / benawad
    Instagram: / benawad97
    Twitter: / benawad
    #benawad
    TikTok: / benawad ​

    ----
    Follow me online: voidpet.com/benawad
    #benawad
  • НаукаНаука

Комментарии • 372

  • @010timeboy27
    @010timeboy27 4 года назад +203

    My face after you mentioned the F2 tip 😲

    • @bawad
      @bawad  4 года назад +35

      You might also like some of my other vscode tricks benawad.com/vscode

    • @cloudeater9571
      @cloudeater9571 4 года назад +28

      @7:55 For anyone looking

    • @bernhardsmuts2265
      @bernhardsmuts2265 4 года назад +1

      Mind blown!

    • @YotaraVideo
      @YotaraVideo 4 года назад +1

      Oh my god yes, this is a game changer!

    • @marcusaureliusregulus2833
      @marcusaureliusregulus2833 2 года назад

      And then he continues to manually change all of them😂

  • @SumeetChawla
    @SumeetChawla 4 года назад +75

    This was such an amazing demo. Clear and to the point!

  • @GeordyJames
    @GeordyJames 4 года назад +7

    I watched the entire hooks playlist and this is the best react hooks video I ever watched. Thanks for creating...

  • @ozzyfromspace
    @ozzyfromspace 2 года назад +27

    I finally appreciate the logical flow from app state to context to context.provider. You absolutely rock, Ben! Thank you 😎👏🏽🔥

  • @VRtualboy
    @VRtualboy 3 года назад

    Thank you for this tutorial! I have been stuck for the past week trying to figure out how to pass details of an authenticated user to other components. This is just what I needed, a clear and easy to follow explanation.

  • @MrMarbles320
    @MrMarbles320 4 года назад +26

    EXACTLY what I was looking for, very well made, thank you!

  • @dockies
    @dockies Год назад +1

    I've been struggling with this so much that I have to watch 7 videos regarding this topic and all it did is make me more confused. But your less than 15 minute video made me understand what it is and how to use it exactly. Kudos to you!

  • @tiagosbrito
    @tiagosbrito 4 года назад +35

    The best tutorial/explanation I ever got from the web, straight to the point, with useful content. Thanks for sharing your knowledge.

  • @Jake66564
    @Jake66564 3 года назад +4

    Exactly what I needed, thanks! Helped me clean up some junky Stack Overflow suggestions that weren't working properly.

  • @mokroargra7277
    @mokroargra7277 3 года назад

    You saved me! I was struggling with getting data from one file to another and understanding context but as soon as I saw you setting state and using / setting state in other components / files, it all clicked. Was able to finish converting my vanilla JS app to React. Thank you!

  • @abhishekghadge7543
    @abhishekghadge7543 3 года назад +2

    The whole series has been so helpful for me. Thanks a lot for creating such awesome videos!

  • @sanhitabiswas1171
    @sanhitabiswas1171 2 года назад +2

    Thanks a lot Ben. You have explained it so nicely . I have searching for session management in React and you made my journey so easy. Thanks again !!

  • @mtsurov
    @mtsurov Год назад

    I like that this is not just an explanation of hook syntax, but a practical application of it.

  • @mohamadybr
    @mohamadybr 3 года назад

    That explained a lot and helped me to clear my mind about this topic. Much appreciation! A very clear and well-explained video without any extra unnecessary info!

  • @LewisCampbellTech
    @LewisCampbellTech 4 года назад +1

    It's friday afternoon here, brain has had enough. I tried reading the react docs a few times, read a few blogs, but this video made it click. Nice work.

  • @AnanyaSingh-jq8pp
    @AnanyaSingh-jq8pp 2 года назад +1

    Thank you so much for explaining it so well. I was having a hard time using the useContext hook, you made it super easy. Thanks a lot!

  • @Frazful
    @Frazful 2 года назад +1

    I love how you use simple ass components on your tutorials. Less boiler plate, straight to the point.

  • @HarisKhan-bh6uj
    @HarisKhan-bh6uj Год назад

    one of the clearest explanation on useContext out there !

  • @DEADSTEP12
    @DEADSTEP12 3 года назад

    Couple days into developing my app and this is exactly what I needed!!! Thanks!

  • @justACasualProgrammer
    @justACasualProgrammer 2 года назад

    I'm having trouble with this type of hook, your explanation and examples are very clear and simple. thank you so much!

  • @leshle1
    @leshle1 2 года назад

    Excellent overview. Not too much, just enough to understand the concept so that I can utilize it. Really good job!!

  • @luisantoniojachozambrano7605
    @luisantoniojachozambrano7605 2 года назад

    11 minutes of pure gold, thank you Ben.

  • @Ashnaflavdjov
    @Ashnaflavdjov 2 года назад

    you saved me... from doing it the old way that is, started learning hooks yesterday and i see how usefull they are, love your content man

  • @CalebDiT
    @CalebDiT Год назад

    You did a great job of making it look easy. Or, put another way, you did a great job of clearing the smoke around something that isn't as complicated as I thought it was.
    Many thanks.

  • @alanhunt3772
    @alanhunt3772 3 года назад +2

    Great video, Ben. I've been back and forth between this video and Web Dev Simplified's useContext tutorial and yours drove it home a little bit better with the practical login example- which is exactly what I'm doing in my project right now. Plus you threw in useMemo as a bonus- props!

  • @stoicnash
    @stoicnash Год назад

    Best demo ive seen, really nailed it!!!

  • @shark5749
    @shark5749 4 года назад

    Thank you! Have been stuck on react hooks for days!

  • @devyadav0399
    @devyadav0399 2 года назад

    The only video that was able to help me. You're a godsend. Keep it up brother.

  • @mmmiyoung
    @mmmiyoung 4 года назад +7

    This really helped me out. Thank you for taking the time to make this video. Real MVP.

  • @AnhTu-en9gk
    @AnhTu-en9gk 2 года назад +1

    this is the easiest context tutorial so far. Thank you

  • @jamesnguyen868
    @jamesnguyen868 5 лет назад +3

    awesome video Ben, keep up the great work

  • @nazrinibrahimli7042
    @nazrinibrahimli7042 Год назад

    This is the best explanation I have ever seen!

  • @CarlitoProductions
    @CarlitoProductions 3 года назад

    Awesome! This helped tons with saving settings. I was prop drilling before but this hook saved my behind. Thanks!

  • @sumitmehra5119
    @sumitmehra5119 2 года назад

    Bro. I've been struggling with react hooks like context, memo and other. Now usecontext is out of the list. Thanks to you. 👑👑

  • @marcusaureliusregulus2833
    @marcusaureliusregulus2833 2 года назад

    Understood. Thanks. Also the sound of you typing is so satisfying😂

  • @user-qk4tx9jc4m
    @user-qk4tx9jc4m 3 года назад +1

    wow... this is the cleanest example of useContext!

  • @yosoyhim
    @yosoyhim Год назад

    Lifesaver. Been trying to find a simple example that I can follow and you did it! thank you

  • @bulldawggy123
    @bulldawggy123 3 года назад

    This was amazing! So helpful. Exactly what I have been crying about. So grateful to you.

  • @joshuaheathcote2116
    @joshuaheathcote2116 Год назад

    Straight to the point. Real nice.

  • @noelcovarrubias7490
    @noelcovarrubias7490 3 года назад

    I was having a little bit of trouble understanding this but I no longer have it. I love you man!

  • @marco114
    @marco114 3 года назад

    This was the best explanation i have seen so far, thanks.

  • @davidbuyinza2651
    @davidbuyinza2651 3 года назад

    You just made everything so easy. Thanks Ben.

  • @logicmonster6197
    @logicmonster6197 Год назад

    my man is straight to the point thanks

  • @TyrannosaurusTroy
    @TyrannosaurusTroy 2 года назад

    Thank you so much for this tutorial! It helped the useContext hook finally click for me.

  • @jialiliang3606
    @jialiliang3606 Год назад

    Really enjoyed learning from your video! Nice work!!

  • @Alphfirm
    @Alphfirm 3 года назад

    Thanks so much! Best tutorial on context, I finally understood it now. Not too quick.

  • @lnhh
    @lnhh 2 года назад

    Such a great and concise demo, even in 2022!

  • @clarkdnro
    @clarkdnro Год назад

    Benawad, you re good in programming. Totu keyboard typing and explanations sayit all. NICE

  • @aliosman975
    @aliosman975 3 года назад

    I was litterally looking for something like this thank you ❤️

  • @MLGMondo
    @MLGMondo 2 года назад

    Very clear explanation and straight to the point. Thanks a lot.

  • @Speeds6080
    @Speeds6080 3 года назад

    Best explanation ever !
    So clear and helped me out heaps !
    Thanks Ben

  • @prathampatel6357
    @prathampatel6357 Год назад

    as clear as I was looking for, thank you very much

  • @nelbabarreto6451
    @nelbabarreto6451 4 года назад +1

    Thank you! Exactly what I was looking for 🙌

  • @mtcindianutube
    @mtcindianutube 4 года назад

    Thank you Ben, great learning in quick time

  • @beinerthchitivamachado874
    @beinerthchitivamachado874 Год назад

    MASTERFULLY EXPLAINED!!!

  • @webdeveloper1922
    @webdeveloper1922 2 года назад

    It was clear and out of making any confusion

  • @margaridalopes5810
    @margaridalopes5810 3 года назад

    Just want to say that you just saved me!
    You're the best Ben!!!
    Thank you very much

  • @ergceme
    @ergceme Год назад

    it was a clear vid to learn basics of using context. thanks

  • @whonayem01
    @whonayem01 2 года назад

    You made it crystal clear!

  • @rjsalamanca7534
    @rjsalamanca7534 4 года назад +1

    Great tutorial, going to implement this on a personal project.

  • @adegokeayobamiseun728
    @adegokeayobamiseun728 Год назад

    Exactly what i need. Thanks ben

  • @lloydschneck4141
    @lloydschneck4141 3 года назад

    Extremely helpful video! Thanks so much for such a simple and effective example 🙏🏼🙏🏼

  • @supermanbrz
    @supermanbrz 2 года назад

    Without a form, you explained better than anyone else

  • @rakeshb2010
    @rakeshb2010 2 года назад

    Simple and easy to understand. Thank you.

  • @natewalchenbach8413
    @natewalchenbach8413 2 года назад

    Such a good explanation. Thank you!!!

  • @abdullahch8535
    @abdullahch8535 3 года назад

    BEST useContext Tutorial

  • @yasser.dev7
    @yasser.dev7 3 года назад

    Amazing explanation, thanks Ben

  • @AkshatSinghania
    @AkshatSinghania 3 года назад

    best tut for react context on the planet , btw that mention of use memo took me to your another tut for usememo then it took me to useState , noice recursive videos

  • @DiestroCorleone
    @DiestroCorleone 2 года назад

    Dude, this was awsome. I've seen lots of videos that overcomplicate the whole thing. After 5 minutes of your video, I already implemented useContext in an app I'm working in and it just saved me a lot of headaches. Thank you!
    WAIT A MINUTE. It's Ben Awad! How didn't I notice? And why am I not subscribed? I could swear I was. Well, guess you've (re)gained a subscriber.

  • @aaasisssx
    @aaasisssx Год назад

    clear and concise, and helpful.

  • @clement3072
    @clement3072 2 года назад

    Hey, currently learning react I love your work and your amazing videos thanks man 👍

  • @stoic2454
    @stoic2454 3 года назад

    Exactly the thing i was looking for, thanku so so much ben!!!

  • @Scottni2
    @Scottni2 3 года назад

    Excellent info and walkthrough, thank you sir!

  • @viktorlnt7835
    @viktorlnt7835 Год назад

    Now I understand why the algorithm kept recommending this guy, it was cool to watch him code

  • @raymondmichael4987
    @raymondmichael4987 2 года назад

    Two year later, I'm watching this, I wonder why it have such a low viewers count, looks some hooks are missing.
    This is real great, no bullshits or styles confusions.
    Greetings from Tanzania 🇹🇿

  • @DairoPortillo
    @DairoPortillo 3 года назад

    Thank you! Exactly what I was looking for.

  • @jseyfert
    @jseyfert 2 года назад +1

    clear concise and perfect!

  • @vladislavishe
    @vladislavishe Год назад

    Great! Thanks you! Best explain of context that i have seen.

  • @zedsmelee
    @zedsmelee Год назад

    Thank you so much, this really helped me out massively.

  • @sstawecki
    @sstawecki 2 года назад

    Thanks for the quick lesson. Buen finde.

  • @filip23128
    @filip23128 2 года назад

    Thanks, great explanation!

  • @sayanadhikary1682
    @sayanadhikary1682 2 года назад

    The concept of ContextAPI became so much clearer for me as a noob in React.

  • @arthurswanson3285
    @arthurswanson3285 3 года назад +21

    Passing setUser as a context so that children can update parent contexts is an awesome pattern.

  • @daydreameravani
    @daydreameravani Год назад

    Thanks a lots , exactly what I am looking for.

  • @rohandevaki4349
    @rohandevaki4349 3 года назад

    Very nice informative video, I am doing a revision of react and redux, and i am revising with your tutorials.

  • @anthonymazzie4237
    @anthonymazzie4237 2 года назад

    Super nice demo

  • @danielfernandez5709
    @danielfernandez5709 Год назад

    Thanks Ben!!! very good tutorial!! 🙂

  • @developersdiary9513
    @developersdiary9513 2 года назад

    Thanks Ben, appreciate that

  • @manolismakris5836
    @manolismakris5836 3 года назад

    Thank you for precious time and for the tips!

  • @KrishnaKumar-jr7qq
    @KrishnaKumar-jr7qq 3 года назад

    Thats a great explanation man .. Hats off to you !!

  • @DerekBraid
    @DerekBraid 4 года назад

    Video is very well done, thanks for sharing the knowledge!

  • @geezer74
    @geezer74 2 года назад

    Just beautiful! plainly beautiful.

  • @santiagoguastavino346
    @santiagoguastavino346 2 года назад

    Thank you very much sir. Very well taught

  • @modern_sapien
    @modern_sapien 3 года назад

    Yo, great straightforward and to the point video. Wonderful for review and for new learners alike, or if you're like me somewhere in between!
    Great job!
    Also, f2 didn't work on my windows machine.

  • @igorferreira5704
    @igorferreira5704 Год назад

    simple but accurate. it's what i needed. thanks!

  • @hoyinleunghk
    @hoyinleunghk 2 года назад

    Great tutorial thank you!

  • @wassup102
    @wassup102 Год назад

    Thank you so much, this is exactly what i wanted!!

  • @trungdeptrai
    @trungdeptrai 2 года назад +1

    Yes i love it , thank for your sharing

  • @AbdulRauf-jy4ks
    @AbdulRauf-jy4ks 3 года назад

    Wooh....Best explaination.. saved a day .! .... From Pakistan .

  • @asadurrahmansifat
    @asadurrahmansifat 7 месяцев назад

    Nice explanation, thanks.