Learn React Hooks: useContext - Simply Explained!
Vložit
- čas přidán 24. 05. 2023
- Join The Discord! → discord.cosdensolutions.io
Source Code → github.com/cosdensolutions/co...
In this video we will learn about React hooks, starting with useContext. This powerful React hook will allow you to manage your state efficiently without having to pass an enormous amount of props around (prop drilling). You will learn how to identify when to use the React Context API, how to use createContext to create the context, create a custom hook to handle undefined values, and finally use the context in any component to get access to the data.
In this new React world, hooks are here to stay, so it's best to learn them! In this tutorial I demonstrate the useContext React hook, and I explain it very simply and in a way that is easy to understand. Enjoy!
Hey everyone! I just launched 🚀 Project React, which is a course that teaches you React by building a real-world project. It goes way beyond what you see in these videos and walks you through step-by-step on how to build a big and complex application with React! You can check it out here: cosden.solutions/project-react
Thank you. I've been learning React for about 4 days and I was confused about the useContext and createContext, but your video explains it well. Thank you.
It's amazing you also taught how to deal with problems and showed proper way to code and handle potential errors.
Great tutorial! I was so confused about how Context works, every other creator complicates it too much. Thank you for simplifying it. Just subbed!
makes me happy to hear!
Thank you for the content. You have the gift to talk about coding in a simple way.
thank you for the kind words!
Wow you're a perfect teacher and programmer thanks for the time that you spent for this amazing content
Thanks man, been watching your videos for the last 7 days. Practicing for mid-senior dev job...
Now I feel like a junior dev 😁, because of all the content I learnt. I "was" a "I can do it, but I can not explain it" person.
But the upside is now I "REALLY" know what to do.
Just subscribed.
And we need more videos on testing.
I have seen a lot of videos on context but this is the best. easy to understand and follow through. thank you.
Hands down best explanation of the topic on the tube. Thank you!
This was a really good explanation. I took notes and later was able to replicate a similar example. I now understand the useContext hook a lot better. I'm just starting with React and this is really my first application, although I work with a team in a project that already have a lot of react. I expect to become more proficient in React to really be able to work on that project. Keep the good work, I hope you get a lot of subscribers soon.
Really happy to hear that dude! You're going to do great ☺️ thank you for the kind words!
@@cosdensolutions please when are going to do a video on HOC
Great one with context, i like the way you handled the undefined scenario. Thanks for the tutorial.
been loving the react tutorials man! dont think anyones ever explained context so simply :)
Wow! Such a excellent explanation and with examples too. Well done 👏👏👏👏
Glad you enjoyed it! 🤙
you where one of the only youtubers who actually got me to subscribe to your channel. Nice way of implementing the idea 😃. And fantastic tutorials, crystal clear.
I hope your videos go viral soon like they should. You are doing a great work with your explanations
Haha imagine going viral for React 😅 would love it!
This was the clearest explanation I've seen. Thank you!
This was straight forward. Thank you for throwing in the extra error handling method as well 🔥
I subscribed!! This is a great way to explain the concept + thanks for adding the error handling part 👍
🤙
Thanks for this great and clear explanation with a lot more edges. Hope you will get 1 million subs soon. Tbh, You deserve it.
Thanks a lot 🤙
That was some good explanation, you made contexts seem obvious...Appreciated
Bro I really love your content and I learn a lot from you, don't worry about subscribers, they will ultimately come to you as your way of explaining is so very good. Keep uploading contents.
thanks for the kind words! 🤙
Great, thanks. It's my first Context video and I think I got it at the first time because it's so well explained, of course having used Redux before makes this easier to understand.
glad to hear it!
After this video you really don't need to watch another video about react useContext. This was excellent video.
Really helpful video, thank you so much!
"If you watch this hook video, you'll probably never need to watch another"
This is so true! You explain it so well. Thank you!
Bro thank you for this video! amazing. I have an interview in 1 hour and it's main thing is knowing about react context!
trying to get a grasp of it,nobody taught like u did,i finally get it now ❤❤
🤙
A really underrated channel, well done bro! ⚡❤
Fantastic tutorial. I really appreciate it. 😊
Thanks for the video bro. Simplified explanation always makes understanding better 😊
Glad you found it useful!
Yes Indeed. Keep it up 👏
Great Explanation, Thank you!
Amazing tutorial.
Thanks a lot.
Thanks it was very helpful
that's incredibly explained, thank you sir
Great content, thank you!
Great job man. its very helpful !!
1:31 This part of the code worked; I have now subscribed!
☺️
I grabs those points clearly, thanks dude.
thanks man I really understood it. Subscribed already
Definitely appreciate your attention to detail and have earned my sub. You helped me understand how I was having trouble with a boilerplate I use that has a useState inside a useEffect. I understand *what* the problem is now (thank you for that video), but I can't figure out what I need to learn to solve it. Thanks for at least helping me get closer.
best explanation ever!🤩
Done thanks!
Wrap useContext hook in a custom hook to handle when the context is null (if component didn't have provider up in the tree when it should have and tried to use the context hook)
great explanation. I was a little bit confuse when using context and how to implement them.
Another great tutorial thanks so much!
Very well explained !!
No doubt I won't need to watch another React Context API video! [Subscribed]
Thanks man! Crystal clear now!
Top-notch explanation. Manifesting 100k subscribers by end of this year
Bro I love the way that you explain keep it up. Subscribed❤
Realy great explanation,thank you
That was such an awesome explanation 👍
Thanks 🤙
Thanks a lot, this was really helpful. Really great video and great channel
glad it helped!
GOD level explanation. I want everyone to subscribe to this channel. Too bad one can't give two likes.
the way you explain react is the best!
really nice and simple explanation thank you for making this video
I reall like this explanation. You're very good, god bless you!
you made it soooooo easy to understand
useContext is a great alternative for a bunch of prop drilling with a bunch of useStates as well in the child component as well.
Top notch! You're the man
Thanks bro, much appreciated !
Thank you man. That is good explanation
great explaination thank you bro!
Crystal Clear... Thanks
Great video, thanks for sharing your time and knowledge,
great explaination on useContext
Amazing Channel for Learning React
Really use full video thanks for doing ... extending my great full and encouragement .... keep doing well..
Great tutorial thanks !
please keep it up with more hooks and thank you !
Will do!
Amazing channel, thanks.
I speak another language, but I'm happy to find this video. Thanks!
Working on adding translated captions to all videos soon!
That subscribe intro you did made me subscribe. Genius.
Thank you very much. Good content
I watched many videos and still did not understand context but this video helped me a lot.
you got this
I literally subscribed after seeing your message in the Video
man, awosome video crystel clear concepts and learned how to write a more safe code(in the pov for debugging)
Cosden. I love you bros 😉
nicee, it works now i'm subscribed
Home of React well explained Tutorials
i put like b4 watching your videos :)
legend
loved ur react tuts.... 🔥🔥🔥🔥🔥🔥🔥🔥
Nice video!
You're the best man
I made an instant subscription 👍
🤙
man.. this is a lot to wrap my head around
Sou desenvolvedora Júnior e seus vídeos estão me ajudando muito a me desenvolver 🚀
thanks . helped a lot
I really did subscribe at 1:57...good one there😂
Just make more videos like this on react plz you explain really well
Will do!
Great example!!!
Thank you bro!
thank you for this
great explanation
Thanks, man very good video. 10 Stars ⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
It would be suggested to put some console log and also the UI just to make it more clear would be a lot helpful too thanks
Great tutorial thanks. My subwoofer got a serious workout every time you banged the mic though :-)
LOL 😂 it gets better in later videos I promise!!!
Thank for this
1:37 if you really want user to get you subscribed create content which user want to watch again and again, most of us won't subscribe but still hit a like button just because we know this video is great and we can come back to you by searching you, to be in our feed create something which we want to see on daily basis and these things are not one watches on daily basis... this is just a advice... you gained 1 subscriber
ok lắm anh trai đẹp zai ơi, em mới học mót không học chính thức, ban đầu em đi móc A => B => C => D, bây giờ thì móc A => D )))
Thanks for the reminder to subscribe. Guilty as charged, but subscribed now.