Learn useMemo In 10 Minutes

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 มิ.ย. 2020
  • 🚨 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 useMemo hook. I go over all the main use cases for useMemo 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:
    useMemo Blog Article: blog.webdevsimplified.com/202...
    React Hooks Playlist: • React Hooks
    🧠 Concepts Covered:
    - How to use hooks in React
    - How to memoize values in React function components
    - How to use the useMemo 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 #useMemo

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

  • @franco-cespi
    @franco-cespi 4 ปีที่แล้ว +295

    These advanced Ract functions are really tricky to understand. You always come with concise videos that explains them really well. Thank you!

    • @webwhale6026
      @webwhale6026 5 หลายเดือนก่อน +2

      Agree 💯

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

    Best useMemo introduction video I seen so far, Please cover more hooks

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

    Thanks for the video! Best useMemo tutorial I've seen. And that second use you explained at the end for useEffect with objects and arrays in the dependencies is awesome. I didn't know how to handle those cases.

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

    Your explanation is so concise and well thought out. Thank you!

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

    This is the clearest explanation I have seen on this topic! Great work!

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

    The amount of clarity Kyle gives while explaining complex concepts is truly unmatched, certainly my go to channel to learn tough concepts.

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

    In every video, you will be taught new things, unlike other TH-camrs. Thank you so much for providing such amazing concepts for free.

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

    2 common use cases of useMemo:
    1. When you want to make a slow function wrap inside useMemo so that doesn't re-compute every single time you render your component and it only computed when you acually need the value from that function since the inputs actually change
    2. Whenever you want to make sure the reference of an object or an array is exactly the same as it was the last time you rendered if none of the internal workings changed, you're gonna want to useMemo here to make sure that you only update the reference of that object whenever the actual contents of the object change instead of updating every single time you render

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

      It is exactly same as Pure components in class

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

      @@kirankamath5891 isnt point can be achieved through useEffect() too?

    • @user-ks9bl8bz9w
      @user-ks9bl8bz9w 10 หลายเดือนก่อน

      I found 3 cases:
      1. Memoizing props to prevent wasted renders
      2. Memoizing values to avoid expensive re-calculation on every render
      3. Memoizing values that are used in dependency array of another hook

    • @itsgojoverfr
      @itsgojoverfr 9 หลายเดือนก่อน +2

      @@ayeshasarwar615 i had the same question but sadly you can't, the variable would be defined INSIDE the useEffect hook and we won't be able to access it outside of it due to scoping

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

    It's really helpful.. please explain useCallback and other hooks please

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

    First thing I do to learn a new tech is see if you have a video on it already so I can learn it fast and easily! Thank you very much for helping developers like me out there. Best wishes!! :)

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

    To be honest, after looking around youtube for some time, I was quite dissatisfied with the tutorials covering react hooks. I clicked on this video ready for another let down, but your video was great!! You cover topics clearly and concisely with a great balance between verbally explaining and showing your code. (I hope that made sense.) Gonna probably go through your whole hooks playlist now. Thanks a lot for the great video.

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

    The clarity you have provided is amazing..thank you

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

    Fantastic tutorial Kyle. Your explanation is precise, on point, and understandable. Your series about React-Hooks is one of the best on TH-cam.

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

    This guy is pure gold when it comes for web development tutorials. Luckily he matches my stack. Can't thank him enough. Keep doing this man :)

  • @romko-romario
    @romko-romario 2 ปีที่แล้ว

    Just a brilliant explanation, lots of thanks! My mentor told me to learn memoization, and after just 10 minutes of this video, I understood what it's for and how to use it.

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

    Amazing video, always can count on your videos being succinct and informative. Thanks man.

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

    Truly commendable. As far as the videos i have seen, none of the youTuber explained this. Thank you so much for explaining meticulously. God bless you.

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

    Sucha an amazin explanation dude !!! Was trying to wrap my head around the memo hook ... your explanation was spot on .

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

    Memoization of object is huge learning for me. Thank you Kyel

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

    Super helpful! One of the best descriptions of useMemo I have seen. Thanks :)

  • @-anonim-3008
    @-anonim-3008 4 หลายเดือนก่อน

    Ohh, thank so much! I watched you video 3 month ago and didn't understand second case, but now you open my eyes! Thanks a lot!

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

    Best UseMemo video I've seen so far, good job Kyle !

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

    Dude I stumbled upon your channel again and it is a gold mine. Thank you!

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

    Awesome stuff as usual Kyle, I'd love to see an useCallback tut, thanks!

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

    I like your videos very much, because they are short and you manage to explain things in a simple way. Thank you!

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

    Amazing explanation!! Thank you so much for the channel and the hard work you put into it, I really appreciate it!!!

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

    Best useMemo explanation so far... Was longing for it... Thaks Kyle! :)

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

    The most simplest video but easiest understand about hooks ,Thank you so much for you sir~

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

    You are absolutely a legend. Your examples are very concise and clear.

  • @MarcoS-bx5uk
    @MarcoS-bx5uk 4 ปีที่แล้ว

    Great. Examples are simple and explanation goes straight to the point.

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

    You killed it man, that's awesome. You make my concept clear. Thanks buddy.

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

    that second application example was really mindBlowing. Thanks.

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

    Thanks a lot for this simple explanation with an example, helped me understand some use cases a lot more.

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

    Simple and clear explanation! Thank you

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

    Amazing man!! loved your explanation!!

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

    Thank you for your clean explanation and it helps me a lot!

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

    This was the best example to understand useMemo. Thanks a lot!

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

    Thank you Kyle! My girlfriend refers to you as the robot guy. You are some kind of Terminator robot sent here from the future to help us with all of our programming needs.

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

      You can notice that he blink at 5:21

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

      my wife agrees :'D

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

      lol

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

    This was an excellent explanation! Thank you!

  • @naveenkumar-vb8tp
    @naveenkumar-vb8tp 2 ปีที่แล้ว

    Amazing explanation🙌, have never seen like this before. thank you

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

    Thanks for the great explanation. Really helpful ❤️

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

    Always the best explanations videos. Keep doing this awesome work! Thank you!

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

    Clear as crystal. Thank you for the vid!

  • @ViktorHugo-je6rq
    @ViktorHugo-je6rq 5 หลายเดือนก่อน

    Thanks Kyle for explanation.
    Separate thanks for your clear english.
    It's easy to hear and to understand each word you say.

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

    Thank you Kyle ! 10 minutes which makes me understand :)

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

    Well explained, Kudos Kyle.

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

    Beautifully explained as usual Kyle

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

    just decided to increment my knowledge of react with this react hooks playlilst during the weekend. Rock on!

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

    Very good explanation! great video man, keep it up! 🦾

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

    Amazing explanation! Great video!

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

    Amazing explanation !!! Well done, thank you very much

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

    This was exactly what i was looking for, thanks!

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

    I love you man, this is so easy to understand.

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

    This content is awesome. Need more such performance improving ideas

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

    Thanks very much for a great explanation.
    Recap: 9:49

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

    Thank you . This video help me understandings about useMemo

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

    Very clear, very helpful. Thanks a lot :).

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

    Extremely clear explanation!

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

    cant wait to implement this trick on my project! Great tutorial!

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

    I am in love with this guy! thank you for explanations :)

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

    Thank you Kyle for your excellent and high quality videos! Please, include the code for this video and your future recordings. Kindly, keep up with your great work!

  • @vivek.tiwary
    @vivek.tiwary 2 ปีที่แล้ว

    Best explanation for useMemo, thank you

  • @AB-dp7pw
    @AB-dp7pw 3 หลายเดือนก่อน

    Great video kyle!

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

    Thanks for the great explanation. Now for my the useMemo march clear than before.

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

    Man, you deserve more subs! big thumbs up

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

    Simple and Clean Background..
    Nice ))

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

    Thank you so much, that was really helpful

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

    Best Practical cases are covered, awesome.

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

    Thanks for simplifying the web man!.

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

    oooh that was the best explanation i've seen so far

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

    Great Tutorial Kyle

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

    you explained with so much ease best video

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

    By far the best explanation

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

    Amazing explanation, thanks

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

    Bravo! Great explanation!

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

    thank you for the concise explanation! great help. cheers!

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

    This was very helpful, thank you man :)

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

    Very nicely explained 🙏

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

    easy explanation thanks bro👍

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

    The object-example was a good one!

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

    This is very helpful! Thanks!

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

    Finally!, I understand this useMemo function, thanks

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

    very easy to understand, thank you very much

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

    so easy for understanding, thanks!

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

    Your videos are spot on thanks dude

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

    very useful video.keep countinue this good work

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

    Great explanation, thanks!!

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

    Thanks Kyle... You're awesome!

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

    Thanks, brilliant way to explain it

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

    High quality content. Thanks :)

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

    Great video and explanation.

  • @Kim-by5uy
    @Kim-by5uy ปีที่แล้ว

    Finally, a concise explanation of useMemo

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

    The sample code explains why and when useMemo is needed very well. Thank you Kyle.

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

      So why dont we use useEffect for the first example?

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

    Have a good day too Kyle. Your video is so great 👍👍👍

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

    Appreciate your effort , well thanks for providing effective content

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

    Crystal Clear explanation!! damn... you're awesome.

  • @azhar.difa_
    @azhar.difa_ 2 ปีที่แล้ว

    thank you! this is gold.

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

    you are a skillful and smart ,patient youngster

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

    Great explanation!

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

    Great video! Thank you so much.