React Memo | useMemo | useCallback - Optimize Performance of your React Applications

  Рет қаралды 57,634

Justin Kim

Justin Kim

Күн бұрын

In this video we first discuss the concept of memoization. Then we learn about how to optimize the renders of your React Components by learning about these three memoization techniques: 1) Memoize your components with React.memo(), 2) Memoize a computed value with the useMemo() hook, 3) Memoize a function with the useCallback() hook.
🗄 Resources:
Further Reading on React Memo: dmitripavlutin.com/use-react-...
Official React API: reactjs.org/docs/react-api.html
Lodash: lodash.com/docs/4.17.15
🔑 Key Concepts:
- React Components
- React.Memo
- useCallback
- useMemo
- Lifecycle Methods
- Renders
#React #Memo #Hooks

Пікірлер: 115
@sakarsr
@sakarsr 4 жыл бұрын
Once again a wonderful explanation on different react hooks and how to use them properly. thanks for your time. God Bless and Good Health.
@MmmMmmGood17
@MmmMmmGood17 3 жыл бұрын
This explanation and demonstration was amazing, I really understood it! Thank you 🙏🏽
@AbdelhameedG
@AbdelhameedG 2 жыл бұрын
Very informative , Thank you! Been searching for someone who explains advanced react since a while, looks like we have a winner!
@Koko-pg8wu
@Koko-pg8wu 10 ай бұрын
Man, please doing more and don't stop! You have some fantastic topics and go really into detail in all of them!! Just discovered your channel and damn man. I promise you keep going and you will have 500k :D
@nson__
@nson__ 4 жыл бұрын
Thank you for this explanation. This is maybe the first video that clearly explains how and when one should use useMemo, useCallback.
@hanjelly5410
@hanjelly5410 3 жыл бұрын
great video! very simple and direct example to explain the memo concept very clearly. it's a fresher course for me about memorization in React.
@nickstaresinic9933
@nickstaresinic9933 2 жыл бұрын
Very informative, thorough, and concise. Good job, Justin. Thanks.
@federicostraus869
@federicostraus869 2 жыл бұрын
incredible video, the only one that explained clearly and correctly how to use the "areEqual" function. I've been struggling with this for a few days and you helped solve the issue. Thanks for sharing your knowledge
@thatindianviewer3110
@thatindianviewer3110 2 жыл бұрын
Saw so many videos on these topics, And finally found something that stuck the landing for me. This is an important frontend interview topic, thank you so much.
@akalrove4834
@akalrove4834 2 жыл бұрын
Amazing video, the only one that actually explained all the nuances.
@alexcostaSE
@alexcostaSE Жыл бұрын
This must be like the 10th video I watch about the topic and this is the first time I really understood! Thanks!
@m3ll0f3ll0
@m3ll0f3ll0 2 жыл бұрын
This filled a lot of gaps left by other explainers, thank you 🙏
@khotambakhromov
@khotambakhromov 4 жыл бұрын
the best explanation on the topic I've ever seen Thank you so much
@arunprakash8859
@arunprakash8859 3 жыл бұрын
Dude your'e awsome, to understand usecallback I have read many articles and still left confused. Now youre explanation made me understand . Hats off
@GodfatherOfKcontent
@GodfatherOfKcontent Жыл бұрын
Hey, Justin. just wanted to say thank you for your video. one of those few videos I can understand without even looking at the screen. A great explanation.
@9704084143
@9704084143 2 жыл бұрын
Way you explain things makes everything clear without any doubt, so far best teacher, thank you.
@davidk3133
@davidk3133 Жыл бұрын
Great video on demonstrating the differences of each hook and hoc. Thanks justin!
@chamnil8666
@chamnil8666 3 жыл бұрын
The best explanation of React.memo,useCallback,useMemo. Thank you soo much,have a blessed day Sir.
@nitinrahangdale1128
@nitinrahangdale1128 3 жыл бұрын
The comment section itself shows how perfect this tutorial is.. No words. Just incredibly easy to understand..
@heyniks1
@heyniks1 Жыл бұрын
This is a great explanation of those 3 features. Thank you!
@MonicaSalamanca
@MonicaSalamanca 2 жыл бұрын
Thank you!! This was the best explanation, simple and easy to understand.
@ryantian3491
@ryantian3491 3 жыл бұрын
Thank you for making such a great video!
@nehaprakash3073
@nehaprakash3073 2 жыл бұрын
Great explanation on the optimisation! Thanks so much..
@sologuitardeshchatterjee
@sologuitardeshchatterjee Жыл бұрын
Great explanation, concept clear. Thanks!
@FranzJose
@FranzJose 2 жыл бұрын
Very well explained. Thank you!
@yadwindersingh9722
@yadwindersingh9722 2 жыл бұрын
Amazing work, best example
@eneiarestivan
@eneiarestivan Жыл бұрын
Really good explanation! Thank you for your work!
@mrtandon5278
@mrtandon5278 3 жыл бұрын
Simple content with a deep understanding of React hooks. Look at the statistics, haters do not exist here.
@dxxta
@dxxta 4 жыл бұрын
thanks....this is helps me more than videos on other channels:)
@berakoc8556
@berakoc8556 3 жыл бұрын
Thanks for the video. I really needed this. Great explanation.
@praveen_javali
@praveen_javali Жыл бұрын
Awesome explanation, I understood the concept!!. Thank you very much.
@punitdixit861
@punitdixit861 3 жыл бұрын
you are awesome man , clear and crisp explanation
@WIBEDRILLMusic
@WIBEDRILLMusic 2 жыл бұрын
This is so sick Justin🔥 Amazing explained 🤩
@xdankitjain
@xdankitjain 3 жыл бұрын
Great explanation Justin. Thank you 😊
@armanulalam4560
@armanulalam4560 2 жыл бұрын
Simple and easy to understand. Thank you
@kamleshkumar-vm8cj
@kamleshkumar-vm8cj 2 жыл бұрын
Just awsome .. everything in one video
@tmosco5149
@tmosco5149 Жыл бұрын
You explanation makes it so easy to understand. Thanks
@Abhishek-vz6ud
@Abhishek-vz6ud 2 жыл бұрын
man.. you are incredible.. wish you made more videos like this.. :)
@rojochen
@rojochen 3 жыл бұрын
Awesome, very instructional. Thanks.
@sarbjitbilling7535
@sarbjitbilling7535 4 жыл бұрын
Thanks for the clear explanation.
@Ashishkumar-wo7ck
@Ashishkumar-wo7ck Жыл бұрын
Godly explaination...shoutout to you man..great job
@user-eb2nj1zf8o
@user-eb2nj1zf8o Жыл бұрын
It took me a while but I understood everything, excellent explanation!!!!
@bilal-khan
@bilal-khan 3 жыл бұрын
Fantastic explanation. Thank you. ❤️
@kulcsarrudolf17
@kulcsarrudolf17 3 жыл бұрын
Very helpful video! Thank you! :)
@sachinsenakulk
@sachinsenakulk Жыл бұрын
Ultimate explanation 👏👏 Understood the concepts clearly now 😍😍 Subscribed
@user-ex4dk6ge6c
@user-ex4dk6ge6c Жыл бұрын
great video, very helpful, thanks
@asifurrahman8257
@asifurrahman8257 3 жыл бұрын
so nicely explained, just wow
@ludwigvillalba1886
@ludwigvillalba1886 Жыл бұрын
Thanks for sharing!
@KevinAlves-xb3je
@KevinAlves-xb3je Жыл бұрын
awesome explanation!
@boring-username
@boring-username 4 жыл бұрын
This is an incredible tutorial. I really like how expand on why things are behaving the way they are, such as when you removed the counter dependency from the useCallback hook. A+ material.
@noahjared1596
@noahjared1596 2 жыл бұрын
I dont mean to be off topic but does anybody know a tool to get back into an instagram account?? I was stupid lost my account password. I would appreciate any tips you can give me.
@adrienjairo6750
@adrienjairo6750 2 жыл бұрын
@Noah Jared instablaster ;)
@noahjared1596
@noahjared1596 2 жыл бұрын
@Adrien Jairo thanks for your reply. I got to the site on google and I'm in the hacking process atm. Looks like it's gonna take a while so I will get back to you later with my results.
@noahjared1596
@noahjared1596 2 жыл бұрын
@Adrien Jairo It did the trick and I actually got access to my account again. Im so happy:D Thanks so much you really help me out :D
@adrienjairo6750
@adrienjairo6750 2 жыл бұрын
@Noah Jared No problem :)
@pt8817
@pt8817 2 жыл бұрын
thanks a lot, the explanation was clear and easy to understand
@himanshushekhar3694
@himanshushekhar3694 2 жыл бұрын
refreshing video
@dinuka
@dinuka 2 жыл бұрын
Great explanation. 🔥
@rajverma5051
@rajverma5051 Жыл бұрын
Thanks a lot buddy ...So helpful 😮
@sansanbycas
@sansanbycas 4 жыл бұрын
great explanation, thanks!
@AngleCoding
@AngleCoding 4 жыл бұрын
glad I can help!
@ruchirai5775
@ruchirai5775 3 жыл бұрын
Thanks for the wonderful explanation...
@drewstifler1440
@drewstifler1440 4 жыл бұрын
Cool work man!
@constWardtz
@constWardtz 3 жыл бұрын
Thank you so much Sir! I learned a lot!!
@kitchenandgardeninglab7636
@kitchenandgardeninglab7636 3 жыл бұрын
Thanks for the knowledge
@monashamsolebad6839
@monashamsolebad6839 2 жыл бұрын
Really helpful, thank you
@joonwantsdat
@joonwantsdat 2 жыл бұрын
wonderful explanation
@yogeshshetty804
@yogeshshetty804 4 жыл бұрын
Great video. thank you so much
@aayushgalav5528
@aayushgalav5528 2 жыл бұрын
Thank you for the video, please fetch some time to make such kind of videos
@AliRaza-hf9bz
@AliRaza-hf9bz 2 жыл бұрын
a great explanation.
@mikiyaskelifa853
@mikiyaskelifa853 2 жыл бұрын
very very help full man thanks thanks very much
@rebinabdollahi3483
@rebinabdollahi3483 7 ай бұрын
awesome explanation thank you
@hassanribery3093
@hassanribery3093 2 жыл бұрын
awesome awesome awesome
@amancca
@amancca 5 ай бұрын
Woow great explanation
@AliSattarBarani
@AliSattarBarani 3 жыл бұрын
An amazing explaination.
@mrajkishor331
@mrajkishor331 9 ай бұрын
Excellent 👌👍🎉🎉
@huzafaarshad973
@huzafaarshad973 2 жыл бұрын
great job
@kishore5358
@kishore5358 2 жыл бұрын
excellent explaination in the KZfaq on memorization so far.But please explain an practical use case of memorization so that we can understand where to use this concept..🙂🙂
@akshay-yeole
@akshay-yeole 3 жыл бұрын
Wonderful....
@pushkaragnihotri1609
@pushkaragnihotri1609 4 жыл бұрын
Nicely explain.
@shabnamnaaz4676
@shabnamnaaz4676 3 жыл бұрын
thanks for these
@karimk8551
@karimk8551 2 жыл бұрын
good stuff thx
@ArunK678
@ArunK678 3 жыл бұрын
Damn.. 4 interviews attended, i wasn't able to answer memo, useMemo, useCallback. Now i not just know what are these,i also know why and in which scenarios these can be used. Thank u😃
@mgrm7031
@mgrm7031 3 жыл бұрын
Awesome
@harmez7
@harmez7 Жыл бұрын
thank you pal
@AM-nm6ts
@AM-nm6ts 2 жыл бұрын
thank you so much
@artgurianov
@artgurianov 4 жыл бұрын
Great stuff 👍! Can you please make more videos about react performance and advanced techniques 🙏🙏🙏
@AngleCoding
@AngleCoding 4 жыл бұрын
I will do! Please stay tuned
@thesnjvsharma
@thesnjvsharma 3 жыл бұрын
@@AngleCoding We're still waiting. :(
@ramalaxmi5562
@ramalaxmi5562 3 жыл бұрын
@@AngleCoding y Tut
@S4LTYT
@S4LTYT 3 жыл бұрын
@@AngleCoding year passed where are videos
@jakobo5521
@jakobo5521 Жыл бұрын
Thank you for that tutorial! Your way of explenation is something what I was looking for :) What kind of font are you using in your IDE? It remains me font from VS Code. Thanks!
@alexgolomb363
@alexgolomb363 3 ай бұрын
Thank you
@analogguy4467
@analogguy4467 2 жыл бұрын
thank u very much
@engenglish610
@engenglish610 3 жыл бұрын
Very good explanation, I'm understood the concept. However, which tools did you use to make this video ?
@shisui_
@shisui_ 4 жыл бұрын
greetings !, excellent video, but I can see the arrow pointing down at the end setCounter, is it an extension?
@vonderklaas
@vonderklaas 2 жыл бұрын
Thank you! Come back to KZfaq!
@codedbyjordan
@codedbyjordan 2 жыл бұрын
So at the end when you talk about the 'memo' high order component and checking if the props are equal in your own function, doesn't this essentially do the same as memoizing the function passed to the child component?
@kiranmohare6276
@kiranmohare6276 Жыл бұрын
nice
@farahiismail969
@farahiismail969 2 жыл бұрын
you won't notice the component rerendering not because react is fast in the rerendering process but because react did not even update the actual dom while the component props,state, elements did not change
@gajendramahadev1203
@gajendramahadev1203 2 жыл бұрын
is it possible to avoid re-render the child sibling component if the child component state changes?
@ossamaelidrissi2624
@ossamaelidrissi2624 3 жыл бұрын
hi .. how to use useCallback inside the useEffect
@Fatima-ie5kj
@Fatima-ie5kj 3 жыл бұрын
why u stop making videos? we need a mentor like u
@paritoshsingh588
@paritoshsingh588 3 жыл бұрын
One question only? What if child doesn't get the counter as prop but get setCounter as a props, so when we click the child the counter state in Parent changes, but is there a way to stop the child re-render it, TLDR; when child changes parent's state is there a way to stop child from re rendering if child is not getting the changed state as prop because in useCallback it will be a dependency so it will remake the function
@VisoBoard
@VisoBoard 2 ай бұрын
I don't get the difference, both your useMemo and useCallback are functions in your example
@SH-lt2iv
@SH-lt2iv 3 жыл бұрын
18:06
@smithdragon6477
@smithdragon6477 3 жыл бұрын
why not use React.memo( component,isEqual ) to compare coming props's function is same or not and replace React.useCallback() hook , this function can recreate forever but we can stop the renderers :)
@smithdragon6477
@smithdragon6477 3 жыл бұрын
if the updateCounter becomes a renderProp with jsx , does useCallback can prevent rerenders for me ?
@grumpycoder4592
@grumpycoder4592 4 жыл бұрын
Why don't react just do all this stuff out of the box!!?
@okekehinde7206
@okekehinde7206 3 жыл бұрын
Because it's just javascript, that's how javascript works by default.
@prince5922
@prince5922 Жыл бұрын
Changing props does not cause a re-render! It is only true if the prop is state, it's changing state that causes a re-render.
@g.nirmalkumar5773
@g.nirmalkumar5773 Жыл бұрын
Best Out there!
Mastering React Memo
26:56
Jack Herrington
Рет қаралды 132 М.
#4: React Hooks - useMemo + React.memo
25:38
Archakov Blog
Рет қаралды 69 М.
Неприятная Встреча На Мосту - Полярная звезда #shorts
00:59
Полярная звезда - Kuzey Yıldızı
Рет қаралды 6 МЛН
OMG😳 #tiktok #shorts #potapova_blog
00:58
Potapova_blog
Рет қаралды 3,6 МЛН
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 47 МЛН
Дибала против вратаря Легенды
00:33
Mr. Oleynik
Рет қаралды 3,3 МЛН
React.memo, useMemo, and useCallback Optimizations
22:09
Code Bushi
Рет қаралды 44 М.
The correct way to optimise React
11:29
Cosden Solutions
Рет қаралды 30 М.
Goodbye, useEffect - David Khourshid
29:59
BeJS
Рет қаралды 494 М.
React Hooks Crash Course (useMemo, useCallback and more).
31:49
developedbyed
Рет қаралды 81 М.
You might not need useEffect() ...
21:45
Academind
Рет қаралды 151 М.
Учимся использовать useMemo, useCallback и React.memo | подводные камни | JavaScript, React
37:25
Елена Литвинова — Искусство Веб-разработки 🛸
Рет қаралды 23 М.
REACT MEMO vs USECALLBACK vs USEMEMO
13:18
Coding With Chaim
Рет қаралды 54 М.
Mastering React's useEffect
25:20
Jack Herrington
Рет қаралды 171 М.
Mojo Programming Language - Full Course for Beginners
2:12:44
freeCodeCamp.org
Рет қаралды 164 М.
Learn useMemo and React Memo for Faster Apps
10:02
Lama Dev
Рет қаралды 70 М.
SSD с кулером и скоростью 1 ГБ/с
0:47
Rozetked
Рет қаралды 219 М.
1$ vs 500$ ВИРТУАЛЬНАЯ РЕАЛЬНОСТЬ !
23:20
GoldenBurst
Рет қаралды 1 МЛН
WWDC 2024 Recap: Is Apple Intelligence Legit?
18:23
Marques Brownlee
Рет қаралды 6 МЛН