Learn useContext In 13 Minutes

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 มิ.ย. 2024
  • 🚨 IMPORTANT:
    Full React Course: courses.webdevsimplified.com/...
    1 Year Free Hosting: www.atlantic.net/webdevsimpli...
    Use code KYLE for an additional $50
    In this video I cover everything you need to know about the useContext hook. I go over all the main use cases for useContext as well as many common mistakes that developers make. This is part of a series of React videos where I cover all the important hooks in React.
    📚 Materials/References:
    useContext Blog Article: blog.webdevsimplified.com/202...
    React Hooks Playlist: • React Hooks
    🧠 Concepts Covered:
    - How to use hooks in React
    - How to use context values in React function components
    - How to use the useContext hook
    🌎 Find Me Here:
    My Blog: blog.webdevsimplified.com
    My Courses: courses.webdevsimplified.com
    Patreon: / webdevsimplified
    Twitter: / devsimplified
    Discord: / discord
    GitHub: github.com/WebDevSimplified
    CodePen: codepen.io/WebDevSimplified
    #ReactJs #WDS #useContext

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

  • @dimitrioszygolanis
    @dimitrioszygolanis 6 หลายเดือนก่อน +75

    In order to simplify it, I think you could create an object, like const values = { darkTheme, toggle } and pass both values inside the ThemeContext.Provider, in order to avoid creating 2 providers.

    • @Xi-tler
      @Xi-tler 4 หลายเดือนก่อน +2

      Yeah you r right

  • @brijspy
    @brijspy 4 ปีที่แล้ว +6

    Thanks a lot kyle :) I have seen so many videos of useContext hook but never seen this kind of a structure which is awesome to maintain and scale. This is gold.

  • @femaledeer
    @femaledeer 4 ปีที่แล้ว +754

    These 13 minute videos end up taking me 2 hours to go through

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

      Same here

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

      I watched Mosh's 2 hour tutorial video and it took me 4 days.

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

      lol i thought I was alone in this! I definitely set my pomodoro to watch this then do some practice problems then 25min later I was like wow I'm only like 5min into the video

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

      still learning a lot though, just slow n steady

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

      @@tvguideondemand mosh videos are normmaly very detailed and so it makes sense you took so long ;-)

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

    This was another useful video from your channel. The first example of useContext in functional/class based components was easy. Second example was a but advanced but still easy to figure out and understand. Thanks for making such awesome content.

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

    The most informative channel I have found for web dev. Thanks again for clearing up another complicated topic so concisely.

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

    Took me like 2 hours and 4 breaks to understand the refactor that you did in the separate file. I also didn't knew that useContext(ThemeProvider) was just like a consumer for function based components. Your tutorials are so amazing. What a neat way to write code, keep making good videos!

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

      same here .. took me loads of time to get a grasp of this 8 min of 7zip video of something which is like a whole chapter

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

      lol same

    • @ronyfluk8396
      @ronyfluk8396 ปีที่แล้ว +18

      If it took you 2 hours to understand what he did then I guess maybe the explanation isn`t that amazing after all? 🤔

    • @piyush6631
      @piyush6631 ปีที่แล้ว +8

      @@ronyfluk8396 By that logic, you can learn HTML, CSS, JS, React and Authentication in just 10 hours by watching one of the BootCamp videos on youtube. Practising and implementing stuff takes much longer than watching a video on it, no matter how good the content is.

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

      @@ronyfluk8396 no. I thought that too but Web Dev Simplified is a great tutor. The problem is we are probably all programmers with different years of experience and understand the problem but React introduces a new way to tackle a problem that probably didn't really exist until you started using React. Most people think to switch themes, just have two css files and have some code to change the class of the body from light to dark..... and you can even use local storage to remember the users choice...
      However if you use React, that solution may introduce other problems therefore useContext has to be understood.

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

    Great video. I just started learning about useReducer and useContext. So perfect timing!!

  • @smdude4
    @smdude4 ปีที่แล้ว +9

    I can't believe how easy it is to understand it the way you explained it. Using your vids as a refresher (haven't done react in a while) and it's been super helpful for my job search. Not sure you're gonna read this but THANK YOU. Will take your full course

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

    fantastic video! I am trying to combine this with your "useReducer" video right now for a somewhat complex bit of state management... I think a video like these combining the two concepts would be a smash hit my dude.

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

    These are amazing thanks for making these, I am in a bootcamp at the moment and we are learning react. These help clear things up a ton so thank you for making these. Keep up the good work Kyle

  • @timothylander3469
    @timothylander3469 ปีที่แล้ว +18

    After watching the entire video once, then duplicating the project during a second viewing, I was able to understand the concepts well enough to add additional context variables and new sibling components that can easily communicate amongst themselves. Your explanations, demos, and walk-throughs are so clear, concise, and to-the-point that with some study, the concepts really begin to sink in. Thank you!

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

      etest

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

    This channel literally has everything that I search for. Can't thank you enough for sharing your knowledge!

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

    You are one of the best at being able to articulate advanced concepts in an easy-to-digest format. Living up to your name. I don't know where I would be without your lessons, you're literally godlike.

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

    Thank you! I was working on a little webapp and totally blanked on the pattern for creating the custom hooks (near the end of the video). You're awesome man 🎊☮️

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

    I have been waiting for this one for so long. Thanks a lot

  • @KevinVandyTech
    @KevinVandyTech 4 ปีที่แล้ว +63

    After watching this video, I refactored one of my side projects, and it's so much cleaner.

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

    I had to rewatch to fully get it, but it all makes sense now. Thanks mate! As always cristal clear explanations, keep up the great work!!

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

    Amazing explanation. I've been able to refactor a complex, nested code using this pattern in minutes. Thank you !

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

    This is easily one of the most insightful videos about web dev I've ever seen. Not only because of the pattern it advances with useContext, but also for how well it illustrates the pursuit of encapsulation and ellegance. Kudos!

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

      nothing elegant about it

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

      Hatred is of no use to you or anyone else.

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

    This is an awesome tutorial. I needed to watche 2 times but it's very clear how useContext works. Great, Kyle. Wish you all the best.

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

    Your reactjs videos are the best! You explain so well and your examples are excellent. I understood this right away after being confused by someone else's vid

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

    Great Video about Context!
    Im just disagreeing with creating multiple Contexts for a variable and its Setter function! You can just pass both as an object as the context value :)

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

      I was also wondering why he didn't do this.

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

      In your case, you are right. But think about you use styled-component's ThemeProvider which accepts only DefaultTheme, that is why nested provider is an option for this case.

  • @alex.noriega
    @alex.noriega 2 ปีที่แล้ว +5

    Hey old friend!
    Your like a team mate who takes enough time to explain what we need for the sake of continue our work.
    I always go back to this channel if there's any concept or JS feature that I don't really understand right after read hundreds of articles or blog publications. Thanks in advance.

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

    A gentle introduction to useContext and context in general. Two points:
    As others have noted, I would have a single provider for both the darkTheme and toggleTheme values.
    Also, I found it confusing that the button now has to live within the FunctionComponent. I'm not sure which is better: wrap the App component in ThemeProvider one level up, or create an intermediate component to hold the button and the FunctionComponent.

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

    Wowwwwwww! I can finally understand this. Very well explained and broken down. I like how you explain from many different angles so you really get your point across

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

    Simple and nice explanation of useContext. Thanks a lot Kyle for such a videos. Keep up good work!

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

    Amazing, I have a class yesterday about useContext, but now, after your video, I'm closer to be able to handle it!!

  • @nanonkay5669
    @nanonkay5669 4 ปีที่แล้ว +94

    I think you can pass in not only state but also functions in the value attribute of the provider like this:
    {children}
    ...and then just destructor the two depending on what you need in a particular component.

    • @ylmazcandelen3121
      @ylmazcandelen3121 4 ปีที่แล้ว +13

      yeah, I was like that's really easy why we need another provider but he finds his way cleaner I assume.

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

      which variable would you destructure? like usually for props it is const { state, function } = props. what would you use instead of props in our children components?

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

      @@wizhaa useContext(name of your context)

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

      @@wizhaa useContext(CanYouReadThat)

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

      Yeah why would you wrap it around another provider. It messes the code

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

    This is so perfect. Exactly what I was looking for. Thank you :)

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

    Just what I needed this Saturday morning, made my app work perfectly! ~ Thank You!

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

    I think the hardest part of this is that you are doing it with themes. If you were to simply expose an object or something and have it available in all of the children, it might be a little bit clearer. Using the theme is actually muddying up your demo.

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

      Agree

    • @user-ti9yn8wg6o
      @user-ti9yn8wg6o ปีที่แล้ว

      Sorta agreed. Although theme here is just boolean value, but new comers need to wrap their head around this one more level

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

      Absolutely, I just can't get my head around this explanation, going to need to check another vid

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

      @@jtaylor8606 Hey check this video out. It helped me a bit better than this
      th-cam.com/video/hUhWtYXgg0I/w-d-xo.html

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

      but what about updating it's value? How would you re-render the app?

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

    Well explained. This is the best explanation about useContext compared to all other videos in this subject. Thanks.

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

    Thank you, Kyle! As always, clear, concise, and direct to the subject! 💯💥👋👌

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

    Yo your youtube title is telling the truth!!! hands down the best version so far !!! thank you!

  • @AndroidCyclist
    @AndroidCyclist 9 วันที่ผ่านมา

    Thank you so much for making these videos. My job is moving to react native from native mobile development and I have found these to be very helpful and even shared the playlist with my team.

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

    These hooks videos were just awesome. really easy to understand. Thank you so much

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

    I love this guy so much but he's persona is what I imagine an alien would create if they were trying to build a human

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

      I've really come to like his personality and his method of explanation.

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

      Right. His cadence sounds like it was the outcome of a deep learning algo.

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

      Be greatful youngling, Kyles stormed Area 51, found alien tech, then set loose their clones to teach us all how to upgrade our world and get better paying jobs.

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

      Why would an alien build a human is my question

    • @dm.hol.3624
      @dm.hol.3624 2 ปีที่แล้ว

      are you all gays here lol

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

    Thanks a lot, you are an exceptional teacher and your code looks so clean!

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

    awesome video, after seeing some articles on internet, this video helps me understand useContext in in only 13 minutes. thanks!

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

    I love your videos and I usually get it on the spot, but honestly this is the first time that it went straight over my head

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

    This tutorial is highly recommended for anyone who needs to understand context API concepts, great Job KYLE ✨✨✨

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

    Awesome video, I like how he increase the code without loosing the complexity understanding of the context.

  • @13has
    @13has 2 ปีที่แล้ว

    You're my hero at this point. I'm literally watching this while on the job.

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

    This is an absolutely fantastic tutorial 👏🏻

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

    Thanks for the detailed explanation as always, very helpful

  • @tushargoyal3088
    @tushargoyal3088 ปีที่แล้ว +10

    what are your thoughts on passing on the update theme function as a value to the original theme context? (instead of it being its own context provider)

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

    there are no words to appreciate your explanation.. infinity hats off!!! God Bless!

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

    Not too sure I understand some of the negative comments, this was a super explanation of useContext and a perfect approach to allow token based security for react apps. Thank you!

  • @MiSt3300
    @MiSt3300 4 ปีที่แล้ว

    I love your channel bro, keep up the good work!

  • @lonniesmith8093
    @lonniesmith8093 ปีที่แล้ว +29

    As a react beginner I'm sure this is a great explanation for someone with a little more experience. As a beginner I found this example to much. Passing a variable down such as a name or number would have been a great start IMO. I hope this is constructive criticism. You channel is amazing!

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

    Thanks for makes these things very easier for me. Love your content. keep it up.

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

    This is Awesome! I’m totally going to make use this tomorrow. 👍🏾

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

    Thank you for the tutorial saved me a lot of time in my current project. God bless you.

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

    Ver clearly explained. The concept is really drilled into my mind. thank you for this amazing video

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

    Look forward for your courses Kyle!

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

    Great video. Thanks. When you 'take it a step further' around 5:45, I had to re-watch a few times. LOL. My brain shut down the first time watching. I guess, I was still processing the first 5 minutes.

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

    Man, you are awesome. Your videos are so much helpful. God bless you.

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

    Thank you so much! I recommend everyone to code along and examine to understand easier

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

    Very good and consise explanation! Thanks for one more awesome tutorial!

  • @DeepakGupta-hj2dv
    @DeepakGupta-hj2dv 4 ปีที่แล้ว

    I love your channel, Keep up your work please make one video on "Event Loop"

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

    Love the video. Thanks for the wondeful contribution. If I wanted to use an external stylesheet in js react native, could context be applied? Not quite sure how that would work? Would love to hear from you. Thanks again for your fantastic work!

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

    Great tutorial as usual. I have a question. Instead of creating another context if i pass toggleTheme in themeContext along with darkTheme value is there any problem??

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

    wow, this is exactly how the mui built their theming. Thank you for the explanation before that I was struggling to understand it.

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

    Thanks kyle, your tutorial so simple i can easily understand 😄

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

    Thanks for the simple and straight forward tutorial.

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

    Kyle you are the man, I can already see you as the top developer trainer in the world!

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

    This is brilliant, thank you!

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

    You're great :-) Excellent, clear explanation, and I was able to put it to use right away.

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

    This is really clear and good guide to this. Though I went through a react course and have solid fundamentals so there is a bias

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

    I love Kyle's lessons, he's probably the one instructor on youtube that I don't get bored watching, but I can't be the one who watches his videos in 0.75 speed, dude be too quick with his logical structures as he speaks lol

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

    Hi Kyle Another good video! I would request you to create a series or a crash course on react-redux and redux thunk as well!

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

    Very nice. Easy to understand. Good example of context

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

    Thanks Kyle for the context theme in React.

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

    This was a great tutorial. This is something i will refer back to in the future

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

      i am refering that to myself right now, for the third time in a week

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

    Awesome content !
    One question though, you wrapped your children into a UpdateProvider that handles the toggleTheme function, but how do you handle multiple fonction ? for example, you might have a toggleTheme function that handles the main color, the toggleFontsize function, and so on. How do you manage to filter the function called by the children ?
    Once again, I can't thank you enough for all the great content you put out.

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

    Good stuff, great to get a deeper understanding of stuff I learn from The Odin Project from you on here!

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

    Exactly what I needed dude ty

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

    I love it very neat! Thank you 🙏🏼

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

    Great! I think you can also combine different values into 'value' props in Context as an object. e.g. value = {[ theme: contextTheme, updateTheme: contextUpdateTheme }}

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

      Yeah, I wonder if we have to use separate contexts for them? Did combining them work for you?

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

      you can provide an object which has multiple keys in it, I haven't checked with passing an array though.

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

      @@supremachine Yeah yeah it totally works. I was commenting that myself up there.

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

      @@vendetta3953 Oooooooh that's not an array I think it's a typo. The closing brace is a curly brace so I guess he was thinking about an object in mind.

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

    Good concise video. One important thing to point out for people wanting to throw redux out in favor of context is that dont think of react context as a replacement for redux, as it is a very expensive operation for react for high frequency updates with react context. For that use redux. for low frequency updates like selecting a locale for you app and something similar, react context is perfect for that use case. This is important as people tend to go crazy after learning react hooks and start refactoring entire code base to this hot new tech. Find the sweet spot.

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

      The best wat to handle state is to dump this piece of shit framework and embrace the king called Svelte.

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

      @@ba8e Yuppppppp reactivity rules

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

    Wow, finally I got how it works :D
    Thank you, Kyle!
    My brain's gonna blow up. But now I should do the same alone as we all together did here :D

  • @ViniciusSantana5581
    @ViniciusSantana5581 11 หลายเดือนก่อน +1

    @WebDevSimplified Great explanation. I'm curious on why you choose to create 2 contexts in ThemeContext Component (ThemeContext and ThemeUpdateContext) over having one context with the ThemeContext.Provider taking as value both darkTheme and toggleTheme in either an Object or Array. Something like

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

    Amazing explanation!! Thanks a lot.

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

    can't thank you enough. got this to work in minutes

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

    Thank you! helped me a lot

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

    so very helpful, just the right level of detail

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

    Not going to lie this is probably the first time I can't follow you without rewinding. The pace is very high in this one, nothing like the other hooks

  • @parrou3
    @parrou3 4 ปีที่แล้ว

    I hope everything is going well for you, I have a question plz , Redux VS React Context: Which one should you choose?

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

      @Tommy Leong Use both. Use context API if don't wanna "prop drill", meaning passing down props more then like 3 children's and/or the parents not needing those props. Then redux when you need to pass state to other component siblings or siblings parents, that you couldn't otherwise do with context API. If that makes sense...that's how I always think about anyways.

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

    I literally spent hours yesterday to get this to work, I have terrible timing

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

      😂 atleast you know now

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

    I love your way of teaching.. keep it up

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

    This was a really good tutorial!

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

    just started learning React, so this is good to see

    • @SACHIN-gd6zy
      @SACHIN-gd6zy 4 ปีที่แล้ว

      React is not good

    • @GustavoMartinZalazarGonzalez
      @GustavoMartinZalazarGonzalez 4 ปีที่แล้ว

      @@SACHIN-gd6zy So what's good?

    • @SACHIN-gd6zy
      @SACHIN-gd6zy 4 ปีที่แล้ว

      @@GustavoMartinZalazarGonzalez Angular

    • @SACHIN-gd6zy
      @SACHIN-gd6zy 4 ปีที่แล้ว

      @@GustavoMartinZalazarGonzalez u want to know the reason? i have plenty :)

    • @SACHIN-gd6zy
      @SACHIN-gd6zy 3 ปีที่แล้ว

      @Tigran Khachaturian stfu

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

    Great video, many thanks for sharing this.

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

    Thank you for helping me reduce my codebase, great video!

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

    This video has saved my hide! Thanks Kyle.

  • @dreamfly555
    @dreamfly555 4 ปีที่แล้ว +97

    This assumes you know what a context is and how in general it's being used. i.e., not for beginners.

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

      I agree, tbh this is not really a tutorial more like watching someone code while somewhat explaining his thought process.

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

      literally 90% of all tutorials assume you are a beginner and I'm getting fucking tired of it... I find intermediate or advanced tutorials such as these very refreshing and sadly they are quite rare...

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

      @@IncomingLegend Me too bro. Tech With Tim has done some nice intermediate and expert python playlist and also object oriented design were he doesnt treat you like a begginner. You may want to check him out

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

      Trust me, come back to this when you need a quick refresher and you'll love how concise this is.

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

    great stuff! thanks a ton!

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

    great video as always. Can we export both contexts from ThemeContext.js file and then useContext({exportedContext}) in consumer files vs creating and exporting custom hooks ?

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

      Hi. I can confirm that either approach works. It depends on personal preference on which method to use. From my perspective, the instructor's way is more convenient and easy to read.

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

    Kyle, can you share the code from this hooks series ? it would be nice to use as reminder :)

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

    One question regarding the refactor, does it mean that it is best practice to avoid using some child component(s)