Learn React Hooks: useContext - Simply Explained!

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

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

  • @cosdensolutions
    @cosdensolutions  9 หลายเดือนก่อน +11

    Hope you enjoyed the video! I also have a really cool and unique course that will teach you way more than this video. You'll learn how to build an actual complex project with React. It's called "Project React" and you can find it at cosden.solutions/project-react. Also, I have a free weekly newsletter called "Import React" with tutorials, news, and cool stuff about React! You can sign up at cosden.solutions/newsletter?s=ytc

  • @mikoajkulczynski5213
    @mikoajkulczynski5213 ปีที่แล้ว +38

    Thank you for the content. You have the gift to talk about coding in a simple way.

  • @osmankain1508
    @osmankain1508 9 หลายเดือนก่อน +6

    Wow you're a perfect teacher and programmer thanks for the time that you spent for this amazing content

  • @GeraldPajulas
    @GeraldPajulas 11 หลายเดือนก่อน +9

    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.

    • @khairulfahim-j9o
      @khairulfahim-j9o 4 หลายเดือนก่อน

      did you complete your react journey?

  • @shubhankarvalimbe5286
    @shubhankarvalimbe5286 ปีที่แล้ว +26

    Great tutorial! I was so confused about how Context works, every other creator complicates it too much. Thank you for simplifying it. Just subbed!

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

    I rarely subscribe to any channels, but I owe it to you because what you taught me in 15 minutes will make a huge impact in my development. so thank you

    • @VsEvil
      @VsEvil 6 วันที่ผ่านมา

      same!

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

    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.

  • @David-eb8lh
    @David-eb8lh 4 หลายเดือนก่อน +4

    Clear explanations with no "fluff!

  • @camilotorresf1
    @camilotorresf1 ปีที่แล้ว +28

    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.

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

      Really happy to hear that dude! You're going to do great ☺️ thank you for the kind words!

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

      @@cosdensolutions please when are going to do a video on HOC

  • @HR-pz7ts
    @HR-pz7ts 10 หลายเดือนก่อน +9

    It's amazing you also taught how to deal with problems and showed proper way to code and handle potential errors.

  • @omobolanleayobami4998
    @omobolanleayobami4998 5 หลายเดือนก่อน +1

    I have seen a lot of videos on context but this is the best. easy to understand and follow through. thank you.

  • @prshendra
    @prshendra 3 หลายเดือนก่อน

    It's like eating a tasty food for the brain. Your presentation and words used is really easy to understand and not verbose. Liked and subscribed.

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

    After this video you really don't need to watch another video about react useContext. This was excellent video.

  • @VsEvil
    @VsEvil 6 วันที่ผ่านมา

    I have subscribed since the very first video I had the luck to find and watch from you 😃. You explain everything very clear and understandable. Thanks for sharing your knowledge.

  • @prabhanshugupta9361
    @prabhanshugupta9361 3 หลายเดือนก่อน

    I watched you before because I have already subscribed some of coding channels but I watched your single video with all of my focus and then I did a subscribe to a channel which was your channel and started watching another video from your channel... Thank You !

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

    "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!

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

    Bro thank you for this video! amazing. I have an interview in 1 hour and it's main thing is knowing about react context!

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

    I'm learning how to avoid prop drilling--this helped so much! Thank you :)

  • @mostinho7
    @mostinho7 6 หลายเดือนก่อน +1

    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)

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

    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.

  • @Caiocsilveira
    @Caiocsilveira 4 หลายเดือนก่อน

    1:34 that was genious and I subd immediately. Nice work!

  • @michaelkroll6913
    @michaelkroll6913 3 หลายเดือนก่อน

    Thank you very much for your video. I finally cleaned up my context implementation and were able to get rid of the question marks 🙂

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

    1:31 This part of the code worked; I have now subscribed!

  • @seelvek6550
    @seelvek6550 3 หลายเดือนก่อน

    Great explanation! I am new to React and your Hook series are really helpful to me. As I also do not have much time to go over everything and this is clear, on point and very concise. Thank you 🙇

  • @jay-kv6wn
    @jay-kv6wn ปีที่แล้ว +6

    I hope your videos go viral soon like they should. You are doing a great work with your explanations

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

      Haha imagine going viral for React 😅 would love it!

  • @AntNZ
    @AntNZ ปีที่แล้ว +11

    Wow! Such a excellent explanation and with examples too. Well done 👏👏👏👏

  • @soduno596
    @soduno596 7 หลายเดือนก่อน

    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.

  • @yongdiamond2301
    @yongdiamond2301 3 หลายเดือนก่อน

    Thanks for content it get me out of props drilling and gaining to know the power of the useContext and customHook.

  • @garudaphoenix5479
    @garudaphoenix5479 ปีที่แล้ว +5

    Thanks for this great and clear explanation with a lot more edges. Hope you will get 1 million subs soon. Tbh, You deserve it.

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

    Best explanation about Context API. Thanks.

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

    useContext is a great alternative for a bunch of prop drilling with a bunch of useStates as well in the child component as well.

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

    I watched many videos and still did not understand context but this video helped me a lot.

  • @homemadebymiko
    @homemadebymiko 2 หลายเดือนก่อน

    Kept your word! Definitely last video I'll need on this concept.

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

    Top-notch explanation. Manifesting 100k subscribers by end of this year

  • @_romeopeter
    @_romeopeter 7 หลายเดือนก่อน

    This was straight forward. Thank you for throwing in the extra error handling method as well 🔥

  • @shawn.builds
    @shawn.builds 8 หลายเดือนก่อน

    been loving the react tutorials man! dont think anyones ever explained context so simply :)

  • @mchisolm0
    @mchisolm0 8 หลายเดือนก่อน

    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.

  • @Chris-by8tg
    @Chris-by8tg 11 หลายเดือนก่อน

    This was the clearest explanation I've seen. Thank you!

  • @brNoMundo123
    @brNoMundo123 10 หลายเดือนก่อน

    Sou desenvolvedora Júnior e seus vídeos estão me ajudando muito a me desenvolver 🚀

  • @wekesirken6961
    @wekesirken6961 11 หลายเดือนก่อน

    That was some good explanation, you made contexts seem obvious...Appreciated

  • @serenaeramo2296
    @serenaeramo2296 2 หลายเดือนก่อน

    Thank you very much, with you I can understand the impossible

  • @jijocleetus
    @jijocleetus 11 หลายเดือนก่อน

    Great one with context, i like the way you handled the undefined scenario. Thanks for the tutorial.

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

    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.

  • @НатальяКостоломова-ъ5г
    @НатальяКостоломова-ъ5г ปีที่แล้ว

    I speak another language, but I'm happy to find this video. Thanks!

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

      Working on adding translated captions to all videos soon!

  • @mgx49
    @mgx49 9 หลายเดือนก่อน

    No doubt I won't need to watch another React Context API video! [Subscribed]

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

    great explanation. I was a little bit confuse when using context and how to implement them.

  • @Aiexpertise-ft9ec
    @Aiexpertise-ft9ec 6 หลายเดือนก่อน

    I grabs those points clearly, thanks dude.

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

    best explanation ever!🤩

  • @Namishkapoor-u4m
    @Namishkapoor-u4m 9 หลายเดือนก่อน

    I literally subscribed after seeing your message in the Video

  • @user-gm3lg8gp3m
    @user-gm3lg8gp3m ปีที่แล้ว +3

    I subscribed!! This is a great way to explain the concept + thanks for adding the error handling part 👍

  • @jeandedieuiradukunda6079
    @jeandedieuiradukunda6079 5 หลายเดือนก่อน

    that's incredibly explained, thank you sir

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

    the way you explain react is the best!

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

    Home of React well explained Tutorials

  • @jasminewu7324
    @jasminewu7324 20 วันที่ผ่านมา

    Great explanation!

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

    Thanks it was very helpful

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

    Thanks for the video bro. Simplified explanation always makes understanding better 😊

  • @Елена-б6в3ж
    @Елена-б6в3ж 4 หลายเดือนก่อน

    Thank you! It's so clear

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

    I reall like this explanation. You're very good, god bless you!

  • @codehustler8582
    @codehustler8582 9 หลายเดือนก่อน

    Amazing Channel for Learning React

  • @jojokman
    @jojokman 3 หลายเดือนก่อน

    Bro said, let me cook 🔥🔥🔥🔥🔥 awsome explanation 🎉

  • @MessiLeo2312
    @MessiLeo2312 10 หลายเดือนก่อน

    man, awosome video crystel clear concepts and learned how to write a more safe code(in the pov for debugging)

  • @calmmind3160
    @calmmind3160 4 หลายเดือนก่อน

    you know im a sub bro, your videos is my goto for react content- one day inshallah i meet you when i build an insane app

  • @sudiptobose8296
    @sudiptobose8296 9 หลายเดือนก่อน

    Fantastic tutorial. I really appreciate it. 😊

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

    That subscribe intro you did made me subscribe. Genius.

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

    Just make more videos like this on react plz you explain really well

  • @RafalTruszkowski-b5t
    @RafalTruszkowski-b5t 2 หลายเดือนก่อน

    Ok, that isSubscribed segment actually got me to subscribe lol

  • @cypherop2608
    @cypherop2608 11 หลายเดือนก่อน

    you made it soooooo easy to understand

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

    trying to get a grasp of it,nobody taught like u did,i finally get it now ❤❤

  • @Jack-ps4jg
    @Jack-ps4jg 6 หลายเดือนก่อน

    really nice and simple explanation thank you for making this video

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

    A really underrated channel, well done bro! ⚡❤

  • @PravinsPhotos
    @PravinsPhotos 11 หลายเดือนก่อน

    I really did subscribe at 1:57...good one there😂

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

    Nice video bro, thanks!!

  • @admasterefe4340
    @admasterefe4340 8 หลายเดือนก่อน +1

    GOD level explanation. I want everyone to subscribe to this channel. Too bad one can't give two likes.

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

    Thanks a lot, this was really helpful. Really great video and great channel

  • @antimrevapati8992
    @antimrevapati8992 10 หลายเดือนก่อน

    Great Explanation, Thank you!

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

    Great content, thank you!

  • @shivasai7707
    @shivasai7707 7 หลายเดือนก่อน

    great explaination on useContext

  • @sathirabandara7981
    @sathirabandara7981 11 หลายเดือนก่อน

    Great job man. its very helpful !!

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

    thanks man I really understood it. Subscribed already

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

    Amazing tutorial.
    Thanks a lot.

  • @beepboop-devon
    @beepboop-devon 3 วันที่ผ่านมา

    Each time he teaches me another hook, I get more attracted to this man.

  • @marceloleoncaceres6826
    @marceloleoncaceres6826 11 หลายเดือนก่อน

    Great video, thanks for sharing your time and knowledge,

  • @UnfinishedYara
    @UnfinishedYara 10 หลายเดือนก่อน

    Thanks man! Crystal clear now!

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

    Realy great explanation,thank you

  • @MiltonIsaya
    @MiltonIsaya 2 หลายเดือนก่อน

    Great video. Thank you!

  • @poornasaipilla1620
    @poornasaipilla1620 10 หลายเดือนก่อน

    Really use full video thanks for doing ... extending my great full and encouragement .... keep doing well..

  • @santiagovelezsaffon
    @santiagovelezsaffon 8 หลายเดือนก่อน

    Very well explained !!

  • @deshannawarathna6283
    @deshannawarathna6283 11 หลายเดือนก่อน

    Thank you man. That is good explanation

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

    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

  • @vivekkumar-pc1xy
    @vivekkumar-pc1xy ปีที่แล้ว

    Crystal Clear... Thanks

  • @Teddyrobinson
    @Teddyrobinson 10 หลายเดือนก่อน

    Another great tutorial thanks so much!

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

    Bro I love the way that you explain keep it up. Subscribed❤

  • @abdoseadaa
    @abdoseadaa 11 หลายเดือนก่อน

    i put like b4 watching your videos :)
    legend

  • @mark-broomfield
    @mark-broomfield ปีที่แล้ว

    Great tutorial thanks. My subwoofer got a serious workout every time you banged the mic though :-)

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

      LOL 😂 it gets better in later videos I promise!!!

  • @juststudying1019
    @juststudying1019 11 หลายเดือนก่อน

    Amazing channel, thanks.

  • @jitujahagirdar613
    @jitujahagirdar613 3 หลายเดือนก่อน

    Really good explain

  • @jouebien
    @jouebien 7 หลายเดือนก่อน

    grouse wrapping the context in a hook. You can build up the provider with state & mutators and pass that to the value of the provider. There's no need to wrap the context with hook jank to extend the context -> with a wrapped hook A) you're not enforce access & mutations B) you also have an extra shit tonne of renders as the hook runs through state changes in every component C) you remove the useContext which hides the fact the component is consuming global/shared state.

  • @mai.krishnahoon
    @mai.krishnahoon 10 หลายเดือนก่อน +1

    Thanks from india..

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

    Thanks bro, much appreciated !

  • @Shaheer-xs5os
    @Shaheer-xs5os ปีที่แล้ว

    That was such an awesome explanation 👍