Тёмный

React Hooks useContext Tutorial (Storing a User) 

Ben Awad
Подписаться 497 тыс.
Просмотров 358 тыс.
50% 1

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

Наука

Опубликовано:

 

28 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 372   
@010timeboy27
@010timeboy27 4 года назад
My face after you mentioned the F2 tip 😲
@bawad
@bawad 4 года назад
You might also like some of my other vscode tricks benawad.com/vscode
@cloudeater9571
@cloudeater9571 4 года назад
@7:55 For anyone looking
@bernhardsmuts2265
@bernhardsmuts2265 4 года назад
Mind blown!
@YotaraVideo
@YotaraVideo 4 года назад
Oh my god yes, this is a game changer!
@marcusaureliusregulus2833
@marcusaureliusregulus2833 2 года назад
And then he continues to manually change all of them😂
@ozzyfromspace
@ozzyfromspace 2 года назад
I finally appreciate the logical flow from app state to context to context.provider. You absolutely rock, Ben! Thank you 😎👏🏽🔥
@SumeetChawla
@SumeetChawla 4 года назад
This was such an amazing demo. Clear and to the point!
@GeordyJames
@GeordyJames 4 года назад
I watched the entire hooks playlist and this is the best react hooks video I ever watched. Thanks for creating...
@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.
@dockies
@dockies Год назад
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!
@MrMarbles320
@MrMarbles320 4 года назад
EXACTLY what I was looking for, very well made, thank you!
@tiagosbrito
@tiagosbrito 4 года назад
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 года назад
Exactly what I needed, thanks! Helped me clean up some junky Stack Overflow suggestions that weren't working properly.
@sanhitabiswas1171
@sanhitabiswas1171 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 !!
@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!
@LewisCampbellTech
@LewisCampbellTech 4 года назад
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.
@abhishekghadge7543
@abhishekghadge7543 3 года назад
The whole series has been so helpful for me. Thanks a lot for creating such awesome videos!
@mtsurov
@mtsurov Год назад
I like that this is not just an explanation of hook syntax, but a practical application of it.
@AnanyaSingh-jq8pp
@AnanyaSingh-jq8pp 2 года назад
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!
@alanhunt3772
@alanhunt3772 3 года назад
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!
@ellsonmendesYT
@ellsonmendesYT 3 года назад
Same as I :)
@Frazful
@Frazful 2 года назад
I love how you use simple ass components on your tutorials. Less boiler plate, straight to the point.
@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!
@DEADSTEP12
@DEADSTEP12 3 года назад
Couple days into developing my app and this is exactly what I needed!!! Thanks!
@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.
@arthurswanson3285
@arthurswanson3285 3 года назад
Passing setUser as a context so that children can update parent contexts is an awesome pattern.
@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!
@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. 👑👑
@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
@leshle1
@leshle1 3 года назад
Excellent overview. Not too much, just enough to understand the concept so that I can utilize it. Really good job!!
@jamesnguyen868
@jamesnguyen868 5 лет назад
awesome video Ben, keep up the great work
@pawzubr
@pawzubr 5 лет назад
`createContext` does not take initial value - it takes the value that is provided when you try to use this context with no provider.
@PrashanthPuranik
@PrashanthPuranik 4 года назад
Wow. I have been searching for this answer for a long time. I wish the documentation would state that clearly and upfront.
@juliohintze595
@juliohintze595 4 года назад
Awesome tip!
@jjanchovi8568
@jjanchovi8568 3 года назад
so its like a default value?lets say i dont add a value in the provider , then it will use whatever its in createContext? in Ben`s example - null.
@juliohintze595
@juliohintze595 3 года назад
I was thinking about this... Why should we use a context with no provider?
@KanecoV
@KanecoV 3 года назад
@@jjanchovi8568 yes, it's like a default value
@shark5749
@shark5749 4 года назад
Thank you! Have been stuck on react hooks for days!
@mmmiyoung
@mmmiyoung 4 года назад
This really helped me out. Thank you for taking the time to make this video. Real MVP.
@CarlitoProductions
@CarlitoProductions 3 года назад
Awesome! This helped tons with saving settings. I was prop drilling before but this hook saved my behind. Thanks!
@bulldawggy123
@bulldawggy123 3 года назад
This was amazing! So helpful. Exactly what I have been crying about. So grateful to you.
@nelbabarreto6451
@nelbabarreto6451 4 года назад
Thank you! Exactly what I was looking for 🙌
@luisantoniojachozambrano7605
@luisantoniojachozambrano7605 2 года назад
11 minutes of pure gold, thank you Ben.
@noelcovarrubias7490
@noelcovarrubias7490 3 года назад
I was having a little bit of trouble understanding this but I no longer have it. I love you man!
@rjsalamanca7534
@rjsalamanca7534 4 года назад
Great tutorial, going to implement this on a personal project.
@aliosman975
@aliosman975 3 года назад
I was litterally looking for something like this thank you ❤️
@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.
@yosoyhim
@yosoyhim Год назад
Lifesaver. Been trying to find a simple example that I can follow and you did it! thank you
@lloydschneck4141
@lloydschneck4141 3 года назад
Extremely helpful video! Thanks so much for such a simple and effective example 🙏🏼🙏🏼
@user-qk4tx9jc4m
@user-qk4tx9jc4m 4 года назад
wow... this is the cleanest example of useContext!
@HarisKhan-bh6uj
@HarisKhan-bh6uj Год назад
one of the clearest explanation on useContext out there !
@Speeds6080
@Speeds6080 3 года назад
Best explanation ever ! So clear and helped me out heaps ! Thanks Ben
@mtcindianutube
@mtcindianutube 4 года назад
Thank you Ben, great learning in quick time
@Alphfirm
@Alphfirm 3 года назад
Thanks so much! Best tutorial on context, I finally understood it now. Not too quick.
@AnhTu-en9gk
@AnhTu-en9gk 2 года назад
this is the easiest context tutorial so far. Thank you
@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 🇹🇿
@marco114
@marco114 3 года назад
This was the best explanation i have seen so far, thanks.
@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.
@stoicnash
@stoicnash Год назад
Best demo ive seen, really nailed it!!!
@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
@davidbuyinza2651
@davidbuyinza2651 3 года назад
You just made everything so easy. Thanks Ben.
@marcusaureliusregulus2833
@marcusaureliusregulus2833 2 года назад
Understood. Thanks. Also the sound of you typing is so satisfying😂
@clement3072
@clement3072 2 года назад
Hey, currently learning react I love your work and your amazing videos thanks man 👍
@devyadav0399
@devyadav0399 2 года назад
The only video that was able to help me. You're a godsend. Keep it up brother.
@MLGMondo
@MLGMondo 2 года назад
Very clear explanation and straight to the point. Thanks a lot.
@DairoPortillo
@DairoPortillo 4 года назад
Thank you! Exactly what I was looking for.
@margaridalopes5810
@margaridalopes5810 3 года назад
Just want to say that you just saved me! You're the best Ben!!! Thank you very much
@rohandevaki4349
@rohandevaki4349 3 года назад
Very nice informative video, I am doing a revision of react and redux, and i am revising with your tutorials.
@supermanbrz
@supermanbrz 2 года назад
Without a form, you explained better than anyone else
@lnhh
@lnhh 2 года назад
Such a great and concise demo, even in 2022!
@jialiliang3606
@jialiliang3606 2 года назад
Really enjoyed learning from your video! Nice work!!
@dangre00
@dangre00 3 года назад
This is the most beautiful useContext explanation on youtube. Sorry Kyle at WDS :(
@Scottni2
@Scottni2 3 года назад
Excellent info and walkthrough, thank you sir!
@DerekBraid
@DerekBraid 4 года назад
Video is very well done, thanks for sharing the knowledge!
@nazrinibrahimli7042
@nazrinibrahimli7042 Год назад
This is the best explanation I have ever seen!
@stoic2454
@stoic2454 3 года назад
Exactly the thing i was looking for, thanku so so much ben!!!
@TyrannosaurusTroy
@TyrannosaurusTroy 2 года назад
Thank you so much for this tutorial! It helped the useContext hook finally click for me.
@joshuaheathcote2116
@joshuaheathcote2116 Год назад
Straight to the point. Real nice.
@clarkdnro
@clarkdnro Год назад
Benawad, you re good in programming. Totu keyboard typing and explanations sayit all. NICE
@manolismakris5836
@manolismakris5836 3 года назад
Thank you for precious time and for the tips!
@chideraachinike7619
@chideraachinike7619 3 года назад
Awesome! Thanks for this, it helped a lot! Much love! ❤️
@yasser.dev7
@yasser.dev7 3 года назад
Amazing explanation, thanks Ben
@prathampatel6357
@prathampatel6357 2 года назад
as clear as I was looking for, thank you very much
@rakeshb2010
@rakeshb2010 2 года назад
Simple and easy to understand. Thank you.
@logicmonster6197
@logicmonster6197 Год назад
my man is straight to the point thanks
@ncesar
@ncesar 4 года назад
Very well explained, thanks!
@KrishnaKumar-jr7qq
@KrishnaKumar-jr7qq 4 года назад
Thats a great explanation man .. Hats off to you !!
@natewalchenbach8413
@natewalchenbach8413 2 года назад
Such a good explanation. Thank you!!!
@danpetre5414
@danpetre5414 4 года назад
Very good explanation. Thanks Ben. :)
@adegokeayobamiseun728
@adegokeayobamiseun728 Год назад
Exactly what i need. Thanks ben
@ergceme
@ergceme Год назад
it was a clear vid to learn basics of using context. thanks
@AlexandreMattosXandyn
@AlexandreMattosXandyn 5 лет назад
Great!!!! Awesome!!! ... you save my life Ben hahahah ^^ ) ... i'm trying create a login without refresh, and you resolve my problem!!! Thanks!!!
@bawad
@bawad 5 лет назад
happy to help :)
@sayanadhikary1682
@sayanadhikary1682 2 года назад
The concept of ContextAPI became so much clearer for me as a noob in React.
@abdullahch8535
@abdullahch8535 3 года назад
BEST useContext Tutorial
@aishwaryasrivastava3682
@aishwaryasrivastava3682 3 года назад
Wow ...you made it so easy. Big thanks from a beginner :)
@zedsmelee
@zedsmelee Год назад
Thank you so much, this really helped me out massively.
@expectations2188
@expectations2188 Год назад
You are awesome Ben. You explained it so well. Thank you :)
@jefersoncosta2621
@jefersoncosta2621 4 года назад
This was awesome! Thanks a lot!
@souta_tran
@souta_tran 4 года назад
super useful, thanks for your work.
@allin4one
@allin4one Год назад
Thanks for the tutorial, trying to learn the context system for when Redux would be overkill.
@webdeveloper1922
@webdeveloper1922 2 года назад
It was clear and out of making any confusion
@whonayem01
@whonayem01 2 года назад
You made it crystal clear!
@viktorlnt7835
@viktorlnt7835 Год назад
Now I understand why the algorithm kept recommending this guy, it was cool to watch him code
@daydreameravani
@daydreameravani Год назад
Thanks a lots , exactly what I am looking for.
@jseyfert
@jseyfert 2 года назад
clear concise and perfect!
@vladislavishe
@vladislavishe Год назад
Great! Thanks you! Best explain of context that i have seen.
@sstawecki
@sstawecki 2 года назад
Thanks for the quick lesson. Buen finde.
@MrJatan90
@MrJatan90 3 года назад
amazing tutorial, thank you so much!
@igorferreira5704
@igorferreira5704 Год назад
simple but accurate. it's what i needed. thanks!
@andreaszaralis
@andreaszaralis 5 лет назад
Thanks for this amazing series Ben, i really enjoy all of your content. Can i ask what keyboard are you using?
@bawad
@bawad 5 лет назад
das keyboard
Далее
Learn React Hooks: useContext - Simply Explained!
15:46
React Hooks useMemo Tutorial
11:21
Просмотров 78 тыс.
How to Roll Your Own Auth
13:05
Просмотров 56 тыс.
Why Signals Are Better Than React Hooks
16:30
Просмотров 465 тыс.
React useContext() hook introduction 🧗‍♂️
11:37
This New React Hook Breaks All The Rules And I Love It
7:56
Learn useReducer In 20 Minutes
20:12
Просмотров 497 тыс.
React Hooks useRef Tutorial
9:22
Просмотров 97 тыс.
Learn useRef in 11 Minutes
10:20
Просмотров 627 тыс.
ОБСЛУЖИЛИ САМЫЙ ГРЯЗНЫЙ ПК
1:00