JavaScript Memoization Made Simple!

  Рет қаралды 6,331

The Code Creative

The Code Creative

Күн бұрын

Пікірлер: 67
@TheCodeCreative
@TheCodeCreative 4 жыл бұрын
kzbin.info/door/mOpHGj4JRWCdXhllVTZCVw
@MajidJahangir-u6v
@MajidJahangir-u6v 5 ай бұрын
Excellent explanation. The best i have seen on KZbin
@TheCodeCreative
@TheCodeCreative 5 ай бұрын
Glad it was helpful!
@_____AjCoder______
@_____AjCoder______ 6 ай бұрын
this video is so underrated !! good job bro cant be explained any better 👏👏👏
@TheCodeCreative
@TheCodeCreative 6 ай бұрын
Glad you liked it!
@clydecalador
@clydecalador 4 жыл бұрын
With such explanations I really hope your number of subscribers increases dramatically. This was by far the best explanation I have seen on this topic. Keep doing what you're doing, you have a gift for teaching!
@TheCodeCreative
@TheCodeCreative 4 жыл бұрын
Hi Clyde, glad to hear it. Thanks for the comment!
@caizza3
@caizza3 3 жыл бұрын
Such a beautiful explanation, in-depth yet clear. Thanks!
@TheCodeCreative
@TheCodeCreative 3 жыл бұрын
Glad to hear, thanks for watching!
@aravindm6124
@aravindm6124 3 жыл бұрын
Awesome explanation!!!!
@TheCodeCreative
@TheCodeCreative 3 жыл бұрын
Glad to hear it!
@nerogatonevoso945
@nerogatonevoso945 4 жыл бұрын
Great explanation! I am making some of Underscore library methods from scratch (for a bootcamp) and was stuck on _.once and _.memoize, but that helped me understand not only about caching but also to be able to do the _.once function, which has similar principles. Thanks!
@TheCodeCreative
@TheCodeCreative 4 жыл бұрын
That sounds like a great thing to do with the Underscore library 👍🏻 Glad this was helpful Nero. Thanks for watching!
@case_tips
@case_tips 3 жыл бұрын
Really creative explanation
@TheCodeCreative
@TheCodeCreative 3 жыл бұрын
Glad you liked it
@aya2222
@aya2222 3 жыл бұрын
Very clear explanation and example!!! Super helpful!! Thank you so much!!!! I also watched your "debounce" video, also wonderful tutorial!! Btw, Do you think your playlist "Javascript" is for people who are learning Advanced JS? I want to learn Advanced JS since I finished basic tutorial and I wonder if the playlist is for me.
@TheCodeCreative
@TheCodeCreative 3 жыл бұрын
Great! Your'e welcome! Yes, that JavaScript playlist has some advanced topics. In particular, I'd check out the videos on the Comparator function, the Rest and Spread Operators, Reduce, and Hoisting. Cheers!
@aya2222
@aya2222 3 жыл бұрын
@@TheCodeCreative Thank you for your reply! I will finish your Javascript playlist!! Btw, do you have any recommended books to deepen our understanding for these JS concepts?
@TheCodeCreative
@TheCodeCreative 3 жыл бұрын
@@aya2222 Yes, check out Kyle Simpson's series "You Don't Know JS"!
@aya2222
@aya2222 3 жыл бұрын
@@TheCodeCreative thank you!! I will check it!!
@TheCodeCreative
@TheCodeCreative 3 жыл бұрын
@@aya2222 👍🏻
@yusefdaramay2177
@yusefdaramay2177 3 жыл бұрын
That was such a great explanation! Thanks 🙏
@TheCodeCreative
@TheCodeCreative 3 жыл бұрын
Thanks for watching Yusef!
@zameeebasha
@zameeebasha 4 жыл бұрын
Can't get clear than this. Great job Gregg. 🙏
@TheCodeCreative
@TheCodeCreative 4 жыл бұрын
Hey Zameerbasha, thanks!
@manedurphy
@manedurphy 4 жыл бұрын
Excellent explanation. Subscribed.
@TheCodeCreative
@TheCodeCreative 4 жыл бұрын
Thanks Dane and thanks for watching!
@ninjarogue
@ninjarogue 4 жыл бұрын
Hey, where is up with your font? the === and
@TheCodeCreative
@TheCodeCreative 4 жыл бұрын
Those are font ligatures for VSCode.
@yuanzhang8956
@yuanzhang8956 2 жыл бұрын
subscribed! Thanks for the video. I will def check more of your videos! I still have a question, if we run the memoize function for two times, doesnt the catch get reassign as am empty obj again? Coz the first line of the code to make it an empty obj??Thanks in advance!!!
@subhashgn1775
@subhashgn1775 3 жыл бұрын
Very well explained. Thank you. I have one question, if we are passing only one argument to the function why are using ...arg?
@lexarisa8418
@lexarisa8418 3 жыл бұрын
...arg allows the flexibility of passing several arguments. Only in this case are we passing only one argument. Hope this helps
@subhashgn1775
@subhashgn1775 3 жыл бұрын
@@lexarisa8418 Thank you.
@beingviksa
@beingviksa 4 жыл бұрын
Great explanation. In React there is a React. memo hook. Does this concept work behind the scene there?
@TheCodeCreative
@TheCodeCreative 4 жыл бұрын
Thanks Vikram!, Yes, useMemo works with the concept of memoization.
@PIYUSH-lz1zq
@PIYUSH-lz1zq 3 жыл бұрын
Please bring more such concepts of js with implementation.
@ManontheBroadcast
@ManontheBroadcast 4 жыл бұрын
if ...args is an array then how can we say cache[args] ? Shouldn't we iterate over each one?
@TheCodeCreative
@TheCodeCreative 4 жыл бұрын
We don't have to iterate because if we store an array as the property on the object it will be coerced to a string.
@TheCodeCreative
@TheCodeCreative 3 жыл бұрын
📖 Download my FREE "Google Search Secrets for Developers" Cheat Sheet: store.thecodecreative.com/google-secrets-cheat-sheet
@IbraheemOmar-fn1ze
@IbraheemOmar-fn1ze 2 жыл бұрын
Noticed some of your symbols look different? Are you using an extension to change this?
@TheCodeCreative
@TheCodeCreative 2 жыл бұрын
Those are fira code ligatures
@IbraheemOmar-fn1ze
@IbraheemOmar-fn1ze 2 жыл бұрын
@@TheCodeCreative cool. What is that? Also how do i get it?
@TheCodeCreative
@TheCodeCreative 2 жыл бұрын
@@IbraheemOmar-fn1ze Here it is: github.com/tonsky/FiraCode
@tanzeemahmed8609
@tanzeemahmed8609 4 жыл бұрын
I am a noob in JS. Can someone please explain the syntax of function that is getting returned from memoize. How do we have access to ...args and how does args get value from outside, why can't I console.log ...args as first line inside the memoize function. I really can't get my head around the return function syntax
@TheCodeCreative
@TheCodeCreative 4 жыл бұрын
Hi Tanzeem, the "memoize" function returns a function. So, if we invoke "memoize", we can assign its result(the function that gets returned) to a variable. Since that variable is now a function, we can invoke it and pass in an needed arguments. And we can use the "rest" parameter(...args) to gather up those arguments.
@TheCodeCreative
@TheCodeCreative 4 жыл бұрын
Also, here's a video explaining the Rest Parameter: kzbin.info/www/bejne/p53EZJV3idiUmtk
@tanzeemahmed8609
@tanzeemahmed8609 4 жыл бұрын
@@TheCodeCreative makes sense to me now.
@TheCodeCreative
@TheCodeCreative 4 жыл бұрын
@@tanzeemahmed8609 👍🏻
@TheCodeCreative
@TheCodeCreative 4 жыл бұрын
🗣JOIN the Code Creative Facebook group! : facebook.com/groups/1612600368887577
@ShreyasKumar
@ShreyasKumar 3 жыл бұрын
LOVED IT
@TheCodeCreative
@TheCodeCreative 3 жыл бұрын
Great, thanks for watching!
@jacinyan3893
@jacinyan3893 3 жыл бұрын
Hi, just wondering if you can make a video to relate this to React memoization and hooks, say useMemo and useCallback. I think that would be highly appreciated by a lot of us😁
@Troy-ol5fk
@Troy-ol5fk 2 жыл бұрын
Please make a video about browser devtools
@TheCodeCreative
@TheCodeCreative 2 жыл бұрын
Great idea. Anything in particular about the devtools?
@Troy-ol5fk
@Troy-ol5fk 2 жыл бұрын
@@TheCodeCreative The breakpoints seems difficult to me
@TheCodeCreative
@TheCodeCreative 2 жыл бұрын
@@Troy-ol5fk ​ Gotcha. Yes, those can be confusing. Thanks for the suggestion!
@dougm3162
@dougm3162 Жыл бұрын
I only understood half of this, but damn was it cool
@TheCodeCreative
@TheCodeCreative Жыл бұрын
👍🏻👍🏻👍🏻
@mohamedyoussef8835
@mohamedyoussef8835 2 жыл бұрын
Super Awesome +++++++++++++++++++++++
@TheCodeCreative
@TheCodeCreative 2 жыл бұрын
Thank you! Cheers!
@neilstrong1735
@neilstrong1735 2 жыл бұрын
You are using closure concept
@photontube
@photontube 3 жыл бұрын
Why is the small number of subscribers here?
@TheCodeCreative
@TheCodeCreative 3 жыл бұрын
KZbin is a tough nut to crack! :-)
@photontube
@photontube 3 жыл бұрын
@@TheCodeCreative I hope your channel will be one of the leading dev solution hub after atmost a year. Keep teaching us sir. Thank you.
@TheCodeCreative
@TheCodeCreative 3 жыл бұрын
@@photontube Thanks! I appreciate it!
JavaScript Comparator Function | Sorting Explained!
12:21
The Code Creative
Рет қаралды 34 М.
Debouncing Explained | JavaScript
11:26
The Code Creative
Рет қаралды 10 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
HTMLCollection vs. NodeList Explained!
19:44
The Code Creative
Рет қаралды 12 М.
Memoize - Leetcode 2623 - JavaScript 30-Day Challenge
8:28
NeetCodeIO
Рет қаралды 14 М.
JavaScript Debouncing Explained Simply
16:04
DevSage
Рет қаралды 9 М.
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 855 М.
JavaScript Pure Functions - Tutorial for beginners
19:20
ColorCode
Рет қаралды 16 М.