React Memo | useMemo | useCallback - Optimize Performance of your React Applications
2020 ж. 9 Ақп.
57 083 Рет қаралды
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-memo-wisely/
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
Very informative, thorough, and concise. Good job, Justin. Thanks.
Very informative , Thank you! Been searching for someone who explains advanced react since a while, looks like we have a winner!
Once again a wonderful explanation on different react hooks and how to use them properly. thanks for your time. God Bless and Good Health.
This explanation and demonstration was amazing, I really understood it! Thank you 🙏🏽
Great video on demonstrating the differences of each hook and hoc. Thanks justin!
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.
Amazing video, the only one that actually explained all the nuances.
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
This is the best explanation of these 3 tools I've seen. Thanks for the amazing video!
This is a great explanation of those 3 features. Thank you!
the best explanation on the topic I've ever seen Thank you so much
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.
Thank you for this explanation. This is maybe the first video that clearly explains how and when one should use useMemo, useCallback.
Very well explained. Thank you!
Thank you!! This was the best explanation, simple and easy to understand.
Thank you for making such a great video!
Dude your'e awsome, to understand usecallback I have read many articles and still left confused. Now youre explanation made me understand . Hats off
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.
This filled a lot of gaps left by other explainers, thank you 🙏
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
Way you explain things makes everything clear without any doubt, so far best teacher, thank you.
Great explanation on the optimisation! Thanks so much..
This must be like the 10th video I watch about the topic and this is the first time I really understood! Thanks!
Really good explanation! Thank you for your work!
You explanation makes it so easy to understand. Thanks
Amazing work, best example
Thanks for the clear explanation.
Thanks for sharing!
you are awesome man , clear and crisp explanation
Thanks for the video. I really needed this. Great explanation.
Awesome explanation, I understood the concept!!. Thank you very much.
Simple and easy to understand. Thank you
Great explanation, concept clear. Thanks!
Fantastic explanation. Thank you. ❤️
Great explanation Justin. Thank you 😊
This is so sick Justin🔥 Amazing explained 🤩
thanks....this is helps me more than videos on other channels:)
Thanks for the knowledge
awesome explanation!
Great explanation. 🔥
Just awsome .. everything in one video
man.. you are incredible.. wish you made more videos like this.. :)
The best explanation of React.memo,useCallback,useMemo. Thank you soo much,have a blessed day Sir.
Awesome, very instructional. Thanks.
great video, very helpful, thanks
so nicely explained, just wow
Godly explaination...shoutout to you man..great job
Simple content with a deep understanding of React hooks. Look at the statistics, haters do not exist here.
Very helpful video! Thank you! :)
wonderful explanation
Really helpful, thank you
Excellent 👌👍🎉🎉
Thanks a lot buddy ...So helpful 😮
It took me a while but I understood everything, excellent explanation!!!!
awesome explanation thank you
Cool work man!
Thanks for the wonderful explanation...
a great explanation.
Thank you so much Sir! I learned a lot!!
Great video. thank you so much
thanks a lot, the explanation was clear and easy to understand
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.
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.
@Noah Jared instablaster ;)
@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.
@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
@Noah Jared No problem :)
Thank you for the video, please fetch some time to make such kind of videos
refreshing video
Nicely explain.
The comment section itself shows how perfect this tutorial is.. No words. Just incredibly easy to understand..
Ultimate explanation 👏👏 Understood the concepts clearly now 😍😍 Subscribed
Woow great explanation
great job
An amazing explaination.
Wonderful....
very very help full man thanks thanks very much
great explanation, thanks!
glad I can help!
thanks for these
excellent explaination in the KZhead on memorization so far.But please explain an practical use case of memorization so that we can understand where to use this concept..🙂🙂
thank you so much
Great stuff 👍! Can you please make more videos about react performance and advanced techniques 🙏🙏🙏
I will do! Please stay tuned
@@AngleCoding We're still waiting. :(
@@AngleCoding y Tut
@@AngleCoding year passed where are videos
good stuff thx
Thank you
thank you pal
Awesome
awesome awesome awesome
thank u very much
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😃
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!
greetings !, excellent video, but I can see the arrow pointing down at the end setCounter, is it an extension?
Thank you! Come back to KZhead!
nice
Very good explanation, I'm understood the concept. However, which tools did you use to make this video ?
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?
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
is it possible to avoid re-render the child sibling component if the child component state changes?
hi .. how to use useCallback inside the useEffect
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
why u stop making videos? we need a mentor like u
I don't get the difference, both your useMemo and useCallback are functions in your example
18:06
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 :)
if the updateCounter becomes a renderProp with jsx , does useCallback can prevent rerenders for me ?
Why don't react just do all this stuff out of the box!!?
Because it's just javascript, that's how javascript works by default.
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.