Learn useMemo In 10 Minutes

  Рет қаралды 493,632

Web Dev Simplified

Web Dev Simplified

Күн бұрын

Пікірлер: 413
@franco-cespi
@franco-cespi 4 жыл бұрын
These advanced Ract functions are really tricky to understand. You always come with concise videos that explains them really well. Thank you!
@webwhale6026
@webwhale6026 Жыл бұрын
Agree 💯
@tajpouria
@tajpouria 4 жыл бұрын
Best useMemo introduction video I seen so far, Please cover more hooks
@elhaambasheerch7058
@elhaambasheerch7058 Жыл бұрын
The amount of clarity Kyle gives while explaining complex concepts is truly unmatched, certainly my go to channel to learn tough concepts.
@tienlx91
@tienlx91 3 жыл бұрын
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 Жыл бұрын
@@kirankamath5891 isnt point can be achieved through useEffect() too?
@DERICKBLACIDOCONTRERAS-c7f
@DERICKBLACIDOCONTRERAS-c7f Жыл бұрын
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 Жыл бұрын
@@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
@daminipurohit6916
@daminipurohit6916 4 жыл бұрын
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!! :)
@girri
@girri 4 жыл бұрын
This is the clearest explanation I have seen on this topic! Great work!
@sahidulislamjony5769
@sahidulislamjony5769 2 жыл бұрын
Memoization of object is huge learning for me. Thank you Kyel
@haniamania5884
@haniamania5884 2 жыл бұрын
Dziękujemy.
@yitzchaksviridyuk932
@yitzchaksviridyuk932 4 жыл бұрын
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.
@ionutsandu5913
@ionutsandu5913 3 жыл бұрын
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 :)
@aryanshmahato
@aryanshmahato 4 жыл бұрын
It's really helpful.. please explain useCallback and other hooks please
@bencodes
@bencodes 3 жыл бұрын
Your explanation is so concise and well thought out. Thank you!
@nareshbhati7527
@nareshbhati7527 3 жыл бұрын
In every video, you will be taught new things, unlike other KZbinrs. Thank you so much for providing such amazing concepts for free.
@dean6046
@dean6046 4 жыл бұрын
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 жыл бұрын
You can notice that he blink at 5:21
@dec2mclaren
@dec2mclaren 4 жыл бұрын
my wife agrees :'D
@devolee8302
@devolee8302 4 жыл бұрын
lol
@jaytran247
@jaytran247 4 жыл бұрын
Thanks very much for a great explanation. Recap: 9:49
@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.
@-anonim-3008
@-anonim-3008 11 ай бұрын
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!
@ashwinsuryawanshi
@ashwinsuryawanshi 3 жыл бұрын
Being simple is not so simple and Kyle has mastered it.
@Kim-by5uy
@Kim-by5uy 2 жыл бұрын
Finally, a concise explanation of useMemo
@serhiikhrapin5024
@serhiikhrapin5024 3 жыл бұрын
5:49 In fact, useMemo is not called on every single render of the component. It only gets called when number changes.
@koningguidokip
@koningguidokip 2 жыл бұрын
I think useMemo get’s called every single time, but useMemo detects if the input has changed and decides if the callback function needs to be executed
@dsuryas
@dsuryas 3 жыл бұрын
I just immediately fell in love with useMemo. I mean, wow!
@julietonyekaoha402
@julietonyekaoha402 2 жыл бұрын
The sample code explains why and when useMemo is needed very well. Thank you Kyle.
@Briefklammer1
@Briefklammer1 2 жыл бұрын
So why dont we use useEffect for the first example?
@nitinkadam8588
@nitinkadam8588 5 ай бұрын
Key Differences - useMemo is used to memoize values. - useCallback is used to memoize functions. Usage: - Use useMemo when you have a computation that you want to avoid recalculating unless necessary. - Expensive calculations that don’t need to be recalculated every render. - Derived state that involves costly processing. - Large lists or data sets that require processing before rendering. - Passing objects or arrays as props to prevent unnecessary re-renders of child components. - Complex dependency arrays in hooks. - Use useCallback when you have a function that you want to avoid recreating unless necessary. Return Value: - useMemo returns the result of the computation. - useCallback returns the memoized function.
@morphman86
@morphman86 3 жыл бұрын
Excellent tutorial, as always. Completely unrelated, but that audio artefact around 7:44 almost had me throw my headphones away again. That exact sound is what my headphones usually make when they break. Because I got distracted, I decided to rewind a few seconds to hear what you said, and the artefact was there at the exact same spot. That's when I realized it was the video and not my headphones -_- Yeah, I go through a lot of headphones, about 8-10 pairs per year. Always the left one going first, for some reason...
@ogat8909
@ogat8909 3 жыл бұрын
Nice to have Kyle in the world of internet, you're my ideal dev!
@JuanDGoPro
@JuanDGoPro 3 жыл бұрын
Finally!, I understand this useMemo function, thanks
@ViktorHugo-je6rq
@ViktorHugo-je6rq Жыл бұрын
Thanks Kyle for explanation. Separate thanks for your clear english. It's easy to hear and to understand each word you say.
@陽楊-o3l
@陽楊-o3l 4 жыл бұрын
The most simplest video but easiest understand about hooks ,Thank you so much for you sir~
@mostinho7
@mostinho7 Жыл бұрын
Todo: 2:50 why does react seem to detect change in double number variable even though it’s not state? It doesn’t, but when the state changes the react component is re-rendered which means all the code inside our functional component runs again, so slow function is executed
@MolinRJ
@MolinRJ 3 жыл бұрын
that second application example was really mindBlowing. Thanks.
@karim6179
@karim6179 Жыл бұрын
i literally been searching in udemy for a course that explain react hooks like this saw couple of videos but none of theme get to that great content quality feels guilty to get that for free thanks man
@ThomasPGeorgeCSB-
@ThomasPGeorgeCSB- 9 ай бұрын
This was the best example to understand useMemo. Thanks a lot!
@RejetiMeghaVardhan
@RejetiMeghaVardhan Ай бұрын
Thank you Kyle! for giving such clarity in explanation
@jovantancevski7629
@jovantancevski7629 2 жыл бұрын
Best UseMemo video I've seen so far, good job Kyle !
@xWildStorm7x
@xWildStorm7x 4 жыл бұрын
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.
@suryaprakashm1886
@suryaprakashm1886 2 жыл бұрын
Sucha an amazin explanation dude !!! Was trying to wrap my head around the memo hook ... your explanation was spot on .
@shadmanmartinpiyal4057
@shadmanmartinpiyal4057 3 жыл бұрын
just decided to increment my knowledge of react with this react hooks playlilst during the weekend. Rock on!
@roadsideromeo9215
@roadsideromeo9215 2 жыл бұрын
You killed it man, that's awesome. You make my concept clear. Thanks buddy.
@romko-romario
@romko-romario 3 жыл бұрын
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.
@fbiindia9661
@fbiindia9661 2 жыл бұрын
you are a legend Sir! going through a Meta certified frontend course and they did a pretty bad job at explaining memo, I already knew where I have to come to understand it better and I was correct.
@wittyhumour29
@wittyhumour29 3 жыл бұрын
Fantastic tutorial Kyle. Your explanation is precise, on point, and understandable. Your series about React-Hooks is one of the best on KZbin.
@devDive615
@devDive615 Жыл бұрын
oooh that was the best explanation i've seen so far
@yassineaker
@yassineaker 2 жыл бұрын
You are absolutely a legend. Your examples are very concise and clear.
@anuragk6722
@anuragk6722 2 жыл бұрын
By far the best explanation
@billwu7367
@billwu7367 Жыл бұрын
you are a skillful and smart ,patient youngster
@tomino133
@tomino133 4 жыл бұрын
Dude I stumbled upon your channel again and it is a gold mine. Thank you!
@jessejburton
@jessejburton 4 жыл бұрын
Super helpful! One of the best descriptions of useMemo I have seen. Thanks :)
@sangdilbiswal30
@sangdilbiswal30 Ай бұрын
bro your explanations are insane
@АлексейСтепанов-к9о
@АлексейСтепанов-к9о 2 жыл бұрын
Thanks for the great explanation. Now for my the useMemo march clear than before.
@sologuitardeshchatterjee
@sologuitardeshchatterjee 4 жыл бұрын
Best useMemo explanation so far... Was longing for it... Thaks Kyle! :)
@lpaddikt
@lpaddikt 3 жыл бұрын
Amazing video, always can count on your videos being succinct and informative. Thanks man.
@darynadatsenko3266
@darynadatsenko3266 2 жыл бұрын
I am in love with this guy! thank you for explanations :)
@LEGnewTube
@LEGnewTube Жыл бұрын
Clear as crystal. Thank you for the vid!
@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!
@yatrikamrutiya9376
@yatrikamrutiya9376 2 жыл бұрын
Amazing man!! loved your explanation!!
@ekwan16
@ekwan16 2 жыл бұрын
Extremely clear explanation!
@cervece41
@cervece41 4 жыл бұрын
Awesome stuff as usual Kyle, I'd love to see an useCallback tut, thanks!
@dixztube
@dixztube 2 жыл бұрын
Great job I need to use this solution. Folks I’d say this stuff is easier to learn once you learn the basics of how memory works. And ref vs value and component lifecycle. It’ll make this make way more sense
@RohithVarma36
@RohithVarma36 3 жыл бұрын
Best Practical cases are covered, awesome.
@gourabpaul3560
@gourabpaul3560 3 жыл бұрын
I love you man, this is so easy to understand.
@MarcoS-bx5uk
@MarcoS-bx5uk 4 жыл бұрын
Great. Examples are simple and explanation goes straight to the point.
@yushsingla9905
@yushsingla9905 3 жыл бұрын
God level explanation, I am glad I clicked this video!!
@naveenkumar-vb8tp
@naveenkumar-vb8tp 3 жыл бұрын
Amazing explanation🙌, have never seen like this before. thank you
@dimitargetsov9690
@dimitargetsov9690 3 жыл бұрын
Sir Kyle, Friends, useMemo(()=>()=>()=>()=>someresult) works! If i am not wrong , useMemo executes not only the function passed to it ,but continues and executes the nested in function, nested in function, nested in function...function.
@briancasady6182
@briancasady6182 2 жыл бұрын
This was exactly what i was looking for, thanks!
@jakexz4251
@jakexz4251 2 жыл бұрын
bro you are a god, you just save me thank you so much
@freak2137
@freak2137 3 жыл бұрын
cant wait to implement this trick on my project! Great tutorial!
@udaychandra7663
@udaychandra7663 3 жыл бұрын
Thank you for your clean explanation and it helps me a lot!
@yinonelbaz5309
@yinonelbaz5309 2 жыл бұрын
Amazing explanation!! Thank you so much for the channel and the hard work you put into it, I really appreciate it!!!
@nazarpasha
@nazarpasha 2 жыл бұрын
easy explanation thanks bro👍
@ZehnGen
@ZehnGen 3 жыл бұрын
Thanks a lot for this simple explanation with an example, helped me understand some use cases a lot more.
@tinnguyenvan9925
@tinnguyenvan9925 4 жыл бұрын
Thank you . This video help me understandings about useMemo
@talkwithshiva8941
@talkwithshiva8941 3 жыл бұрын
you explained with so much ease best video
@mhdfirassbarakat6587
@mhdfirassbarakat6587 2 жыл бұрын
keep in mind that my entire career depends on your videos 😂😂😂😂 so keep up the great work 💙💙
@phantom7132
@phantom7132 4 жыл бұрын
The object-example was a good one!
@hayveno
@hayveno 2 жыл бұрын
Well explained, Kudos Kyle.
@erfanm1206
@erfanm1206 3 жыл бұрын
wow man you explain very well my mother tongue is not english but even thuogh i understand it perfectly you are amazing Thank You
@davidgentilli7944
@davidgentilli7944 4 жыл бұрын
Simple and clear explanation! Thank you
@shakdaniel
@shakdaniel 4 жыл бұрын
Very good explanation! great video man, keep it up! 🦾
@taufikdev
@taufikdev 3 жыл бұрын
Thank you Kyle ! 10 minutes which makes me understand :)
@TechnoDB
@TechnoDB 4 жыл бұрын
Simple and Clean Background.. Nice ))
@anthonysim563
@anthonysim563 2 жыл бұрын
This was an excellent explanation! Thank you!
@SOUVIK_RAY_
@SOUVIK_RAY_ 3 жыл бұрын
Amazing explanation! Great video!
@alvarocastillocorrea2610
@alvarocastillocorrea2610 4 жыл бұрын
Thanks for simplifying the web man!.
@aashayamballi
@aashayamballi 4 жыл бұрын
Thanks Kyle... You're awesome!
@ngocminhle9127
@ngocminhle9127 4 жыл бұрын
Very clear, very helpful. Thanks a lot :).
@tadeuszjiwu255
@tadeuszjiwu255 3 жыл бұрын
Amazing explanation !!! Well done, thank you very much
@omarshahid5094
@omarshahid5094 4 жыл бұрын
Thanks for this awesome tutorial. I have a confusion, can't we receive the same thing with useEffect with dependency of the number?
@TheAssasinsBreed
@TheAssasinsBreed 4 жыл бұрын
i think useEffect runs when mounts and updates unlike useMemo which runs only during updates? i might be wrong tho :)
@orennkimg6851
@orennkimg6851 4 жыл бұрын
i have the same question .... someone??
@0xSLN
@0xSLN 4 жыл бұрын
A big difference: Memoization (useMemo) caches the result of the function based on the parameters (dependencies) received, to prevent expensive function calculations.
@thanglenho828
@thanglenho828 3 жыл бұрын
very easy to understand, thank you very much
@abdulmuneebafridi4437
@abdulmuneebafridi4437 Жыл бұрын
Appreciate your effort , well thanks for providing effective content
@barman498
@barman498 4 жыл бұрын
Thanks for the great explanation. Really helpful ❤️
@akhilnegi100
@akhilnegi100 3 жыл бұрын
As soon as I start video, first I would do like the video and than start watching it, so as not to miss liking it later.
@aravindmnair_
@aravindmnair_ 4 жыл бұрын
Man, you deserve more subs! big thumbs up
@arunroy9812
@arunroy9812 2 жыл бұрын
thank you for the concise explanation! great help. cheers!
@tambolaking5383
@tambolaking5383 4 жыл бұрын
This content is awesome. Need more such performance improving ideas
@kaylemaclou
@kaylemaclou 2 жыл бұрын
Well explained, Kyle!
@nikhil6842
@nikhil6842 2 жыл бұрын
Great Tutorial Kyle
@lukeh8392
@lukeh8392 3 жыл бұрын
Your videos are spot on thanks dude
@gabrielaugustodevitodabbad6822
@gabrielaugustodevitodabbad6822 3 жыл бұрын
Amazing explanation, thanks
@vnoommuy
@vnoommuy 4 жыл бұрын
WTF Kyle you're always coming up with videos talking about topics I need to learn. You wizard!
Learn useRef in 11 Minutes
10:20
Web Dev Simplified
Рет қаралды 654 М.
Learn useCallback In 8 Minutes
7:50
Web Dev Simplified
Рет қаралды 481 М.
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
You Probably Shouldn't Use React.memo()
10:17
Theo - t3․gg
Рет қаралды 58 М.
Learn useMemo and React Memo for Faster Apps
10:02
Lama Dev
Рет қаралды 73 М.
Top 6 React Hook Mistakes Beginners Make
21:18
Web Dev Simplified
Рет қаралды 584 М.
React Hooks Crash Course (useMemo, useCallback and more).
31:49
developedbyed
Рет қаралды 88 М.
Speed Up Your React Apps With Code Splitting
16:50
Web Dev Simplified
Рет қаралды 395 М.
Learn React Router v6 In 45 Minutes
46:20
Web Dev Simplified
Рет қаралды 575 М.
Learn React Hooks: useCallback - Simply Explained!
17:15
Cosden Solutions
Рет қаралды 109 М.
Mastering React Memo
26:56
Jack Herrington
Рет қаралды 137 М.
Why Signals Are Better Than React Hooks
16:30
Web Dev Simplified
Рет қаралды 493 М.
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН