Mastering React Memo

Поділитися
Вставка
  • Опубліковано 4 жов 2024

КОМЕНТАРІ • 426

  • @onebronx
    @onebronx 2 роки тому +93

    Jack, I think you should use "reference identity" instead of "referential integrity".
    The "referential integrity" is a term from a relational database theory and it is a guarantee that all references (foreign keys) point to existing entities and there are no "dangling" references/pointers in your database (or application state). For example, in a normalized Redux store it would mean that if a post object in a "posts" collection has a list of IDs of "comments" (a foreign key form "posts" to "comments"), then all comments referred by the post must be present in the "comments" collection in the store. In a normalized store posts do not keep direct references to comments, only IDs, so it becomes important to care about the referential integrity, as it does not happen naturally.
    The "reference identity" OTOH is just a special case of an equivalence relation, which guarantees equality of two referenced objects if and only if the references point to the same object ("shallow equality") but ignores structural equivalence ("deep equality"). React relies on the reference identity AKA "shallow equality" of two objects. It does not care about referential integrity, like lack of dangling references in your application state.

    • @jherr
      @jherr  2 роки тому +45

      Fair enough. I'll do that in videos that folow.

    • @sahej97
      @sahej97 2 роки тому +9

      How did you manage to write such a big comment?

    • @onebronx
      @onebronx 2 роки тому +10

      @@sahej97 using a PC instead of a phone :)

    • @raymondmichael4987
      @raymondmichael4987 2 роки тому +15

      @@sahej97, this means he knows these things and followed the video to the end, which implies that, Jack is real good.
      Keep it up guys, we're luck to have people like you

    • @raymondmichael4987
      @raymondmichael4987 2 роки тому +6

      @@jherr, I watched the whole video.
      I'm waiting for the next video.
      Thanks for helping us out

  • @alexanderkuznetsov634
    @alexanderkuznetsov634 2 роки тому +61

    Thank you again! So clear explanation! That is the main difference between junior and senior-level developers - it`s when you can provide a clear explanation to your "team members".

  • @sideshowlol
    @sideshowlol 2 роки тому +6

    From the moment you casually typed “zoom” as a css property (which I didn’t realise was even a thing), I knew this was going to be a good’un. Thank you, Jack. Wonderfully clear explanations. 🙏😎

  • @thehaptiK
    @thehaptiK 2 роки тому +7

    that transition at 0:45 is NICE.

  • @dastansito
    @dastansito 2 роки тому +17

    These Mastering React Hooks series are really, but really helpful. I can't thank you enough for everything I'm learning from this. Keep it going!

  • @vigyanhoon
    @vigyanhoon 2 роки тому +1

    Thanks for this, my useMemo and virtual dom concept wasnt much clear before I watched this. Thanks.

  • @atuldubey8146
    @atuldubey8146 Рік тому +1

    Best explanation for memoization on UA-cam.

  • @topsoilgargoyle
    @topsoilgargoyle 2 роки тому +6

    Jack, i have avoided using memoization in React for a long time. I've read blogs, watched tuts, without success. You're lesson here has just made everything click! Your preparation and relevant information are extremely valuable. Thank you very much.

    • @jherr
      @jherr  2 роки тому +5

      You should still avoid it tho. No reason to use it unless you have a genuine performance issue.

  • @vigyanhoon
    @vigyanhoon 2 роки тому +1

    I love the way you jump to code instead of wasting time on talking like others. Keep it up!

  • @rism8345
    @rism8345 2 роки тому +1

    Goddamn! Mm-mm-mm! You took them tutorials on the next level with these transitions and the chapter titles! Probably the best React/Typescript youtube channel out there. Thank you so much for the hard work, can't wait to see you have 500k+ subs on your channel.

  • @vladandreit
    @vladandreit 2 роки тому +5

    Wow. These kind of videos i need learning react. I'm getting tired about all the crash courses(these are good for getting to know react)or full stack whatever and everybody talks about all the basics for begginers. Your videos are taking my understanding about react to a new level. Thank you. I hope you cover more and more advanced stuff because you explain them so well. Like a teacher.

    • @jherr
      @jherr  2 роки тому +1

      Check the channel, I think you'll find there are enough advanced topics videos to keep your happy for a while. :)

  • @mirtanvirahmed3868
    @mirtanvirahmed3868 2 роки тому +3

    i liked the video before even watching.. I know it will be a great one 💯

  • @mcfliermeyer
    @mcfliermeyer Рік тому +1

    I had about a week of building an app using some components I didnt understand that seemed to require useCallback. I kept getting stale state from it. Now I understand why! Thank you much!!!!

  • @jarrettyew
    @jarrettyew 2 роки тому +1

    Great explanation! Was referring the official react doc but it wasn't as clear as this video!

  • @arsalanhussain6499
    @arsalanhussain6499 2 роки тому +2

    The way explianed memoization comparing to traditional memorization was just amazing. in fact you just thought me how memizationreally works under the hood in react. the part where you mentioned when to or not to use moemo in react was also great example to understand the need for memo. thank you very much🙂

  • @utkarshsrivastava4106
    @utkarshsrivastava4106 2 роки тому +1

    You can tell right away by his thinking out loud, that he is a senior developer xD. Thank you for your amazing content :)

  • @raymondmichael4987
    @raymondmichael4987 2 роки тому +1

    I watched several videos on this channel, and I see all new videos ;
    To my surprise, I wasn't a subscriber to the channel yet!! 🙆🏾‍♂️,
    Subed now 🤓

  • @mohsinwaseem9770
    @mohsinwaseem9770 Рік тому +1

    This is the best video I have seen on the topic. From giving the concepts to telling its pros cons with correct usage. All things are included in depth summarized in this 27 min tutorial. Hope you channel grows

  • @down__lo7359
    @down__lo7359 2 роки тому +6

    "React Memo" == "Render if the props have changed"

    • @CHN-yh3uv
      @CHN-yh3uv 5 місяців тому

      Why isn’t this the default behavior though?

  • @kyriakosbekas
    @kyriakosbekas Рік тому +1

    Great explanation Jack! Thank you for your content!!

  • @mdnamussakib8077
    @mdnamussakib8077 2 роки тому +1

    Great Video. Thanks soo much. The whole react memo became very clear for me.

  • @vitorwindberg4212
    @vitorwindberg4212 2 роки тому +1

    The explanation about VDOM and DOM was amazing, I didn't know any of how that worked in React and I bet a lot of people don't as well. Thank you for your videos!

  • @MistaT44
    @MistaT44 2 роки тому +1

    One of the best channels out there! Thank you

  • @alii4334
    @alii4334 2 роки тому +1

    The best tutorial on YT I've ever watched about the topic!

  • @geralt36
    @geralt36 Рік тому +1

    Your videos are always so clear, detailed and to the point. Every time I click on one of your videos and think I know about the subject, I always end up learning something new. Thank you for sharing your knowledge with us!

  • @maxklammer3370
    @maxklammer3370 2 роки тому +1

    Thank you Jack! :) Every time I come to you channel I learn something new :)

  • @nicholasfane1081
    @nicholasfane1081 2 роки тому +4

    These videos are gold Jack, it's hard to find such high quality and down to earth tutorials like these. Keep it up!

  • @manassharma7698
    @manassharma7698 2 місяці тому +1

    This video is a total life saver . Thanks for such a good video.

  • @d0paminer
    @d0paminer 2 роки тому +1

    The only foreign teacher i've been subscribed. Thx from Russia, you are cool man)

    • @jherr
      @jherr  2 роки тому

      Thanks! 😃

  • @swapnilsingh7553
    @swapnilsingh7553 Рік тому +9

    Hi Jack,
    Extremely grateful for this insightful Mastering React series, a small correction at 18:30, I assume you meant to click on the Re-Render app button instead of the Change color button to demonstrate the memo failure with object type parameters.

  • @sourabhkulkarni1731
    @sourabhkulkarni1731 2 роки тому +1

    Loved your explanation. I subscribed immediately!!

  • @leszekmodrzejewski7372
    @leszekmodrzejewski7372 2 роки тому +3

    I have seen dozens or even hundreds of youtube tutorials and this one is one of the best. Great content. I like most that the information is coherent, forming a whole. It is explained in detail. The pace and tone of Jack's voice are engaging. Fantastic job 👏👏👏

  • @Will4_U
    @Will4_U 2 роки тому +5

    Fantastic explanation! Personally, I was struggling and confused about using memorization in React, but this video definitely helped me to understand this topic. Thanks Jack ❤

  • @juandsoto1651
    @juandsoto1651 2 роки тому +1

    This is something really important that almost anybody takes the time to explain. Thank you so much and keep on this kind of amazing vids!

  • @mirajaryal3322
    @mirajaryal3322 2 роки тому +1

    Been looking at lots of videos and reading a lots of articles but couldn't get my head around when and on what these hooks must be used. And with this video everything is crystal clear. Was such a simple concept. Thanks Jack for this great video. Been following your a while for quality content.

  • @krishgarg2806
    @krishgarg2806 2 роки тому +1

    Thanks! Really nice and informative video, and again thanks for taking my suggestion :)

    • @jherr
      @jherr  2 роки тому +1

      It was a good one!

  • @jialx
    @jialx Рік тому +1

    The segment 'Don't sweat Re-renders to much' is personal favourite.

  • @diyaagubarah3328
    @diyaagubarah3328 2 роки тому +1

    best explanations ever I love your way for teaching.

  • @lucaszapico926
    @lucaszapico926 Рік тому +1

    Thanks for the video! Comprehensive, straight forward and thorough. 🙏

  • @rafaelnunes6918
    @rafaelnunes6918 2 роки тому +1

    Thanks, this was the best explanation I've ever heard.

  • @julianfmartinez
    @julianfmartinez 2 роки тому +1

    Clear explanation, now I get it, thank you.

  • @andenetalexander5244
    @andenetalexander5244 2 роки тому +1

    By farrrrrrrrrrrrrrrrrrrrrrrrrr the best tutorial on those topic out there. Greate explanation! 👏

  • @ajstimson
    @ajstimson Рік тому +1

    Jack's discussion of "Don't Sweat Re-Renders Too Much", was eye opening. Thanks for explaining it in reference to old jQuery methods!

  • @hamdinahdi899
    @hamdinahdi899 2 роки тому +1

    awsome and comprehensive explanation thanks a lot

  • @retinafunk
    @retinafunk 2 роки тому +1

    I watched a lot of other docs and tutorials on those hooks and now finally I feel
    understand this properly, even if I used it many times already successfully now I get the fine details and differences and also when not to use them

  • @sukeshkumard6064
    @sukeshkumard6064 2 роки тому +1

    The best and detailed explanation on memo. Thank you so much.

  • @Gringo0517
    @Gringo0517 2 роки тому +4

    Recently discovered your channel and have found it extremely valuable! Liked and subscribed. You have a very clear way of explaining things that I have been struggling with for quite a while :D Thanks and hope your motivation stays high for creating more content!

  • @haroldpepete
    @haroldpepete 2 роки тому +1

    you've got a new subscriber sr, you have the craft or art of teach good and clear

  • @minsaf8216
    @minsaf8216 2 роки тому +2

    Found exactly what I've been looking for. Great explanation. Clear and easy to understand. Please do a series on advance react concepts

    • @jherr
      @jherr  2 роки тому

      So what would you consider advance React concepts?

    • @minsaf8216
      @minsaf8216 2 роки тому +2

      @@jherr concept like Error boundaries, custom hooks

    • @jherr
      @jherr  2 роки тому +3

      @@minsaf8216 Cool. I actually have covered those a bunch, just not in their own videos. I'll have to think of a good way to do that specifically for its own video.

  • @someshmusunuri4233
    @someshmusunuri4233 2 роки тому +1

    best explanation with example. Thankyou

  • @oliver_ai
    @oliver_ai 2 роки тому +1

    Thank you for the masterclass on these topics

  • @sergemorales8709
    @sergemorales8709 Рік тому

    Hey Jack, just wanted to drop a quick message to say thanks for the video! I've been following your content for quite a while now, and I gotta say, you're hands down the best I've come across. I've learned so much from you, not just about coding but also your logical and concise explanations. Thanks again, really appreciate it!

  • @bythealphabet
    @bythealphabet 2 роки тому +4

    Great content Jack,
    thank you for taking the time to explaining React Memo so clearly.

  • @xieweiling7543
    @xieweiling7543 2 роки тому +1

    The best and most thorough explanation I've ever seen! Fantastic!👍

  • @mattlennon3
    @mattlennon3 2 роки тому +1

    Excellent breakdown, I think the part on renaming the function in your head is critical to understand this function for what it actually does.
    Really well edited video too, I'm looking forward to more from your channel!

  • @me_rinta
    @me_rinta Рік тому +1

    Very helpful video. Straight to the point, examples and comparisons included. Definitely cleared up a lot of my questions about React memoization.
    Thank you 🙏🏻

  • @andreslikesramen
    @andreslikesramen 2 роки тому +1

    best video on this subject thanks for helping me understand this better

  • @bjrnolavgjrven2955
    @bjrnolavgjrven2955 2 роки тому +1

    @26:36 my face when he slid across the room revealing that the background is a green screen :o :o :o
    Thats the most impressive green screen I have seen on youtube, it looks so realistic! Also, the transition between your hair and the background is pretty much not noticable. Much impress.

  • @dazjacktar6202
    @dazjacktar6202 2 роки тому +1

    Thanks mate, perfect explanation!

  • @thebattinson1278
    @thebattinson1278 2 роки тому +1

    This is GOLD !
    Thank you.

  • @AM-nm6ts
    @AM-nm6ts 2 роки тому +1

    thank you sir for your intelligence and your pedagogy. very well explained. god bless u

    • @jherr
      @jherr  2 роки тому

      thank you for getting me to look up pedagogy. :)

  • @adnanahmed4176
    @adnanahmed4176 Рік тому +1

    Your explanation skills and demo demonstrations are so amazing! Great videos!

  • @batumanav
    @batumanav 2 роки тому +1

    This was purely informative, thank you so much.

  • @boopfer387
    @boopfer387 2 роки тому

    Jack one of the best breakdowns I've seen on React Memo thank you very much!

  • @Billy_98
    @Billy_98 2 роки тому +2

    Amazing job!!! I hope u will get that Silver Play Button soon. Big like!

  • @kashifniaz4627
    @kashifniaz4627 Рік тому +1

    Thanks.
    it's really too much to digest.
    from-now I am your content follower.

  • @nafas-ki7ce
    @nafas-ki7ce Рік тому +1

    You a wonderful teacher. thanks for your videos

  • @Justjames283
    @Justjames283 2 роки тому +3

    Jack is hands down the best JavaScript teacher on UA-cam!

  • @permanar_
    @permanar_ 2 роки тому +1

    This is really on a whole another class. Rich information yet so compact at a time.
    Thank you!!

  • @ukaszzbrozek6470
    @ukaszzbrozek6470 2 роки тому +1

    Great stuff ! This topic was always confusing to me. Thanks !

  • @DavidCCR
    @DavidCCR 2 роки тому +1

    Really great explanation. Your videos are getting better and better! Thanks a lot!

  • @tazimmahta7625
    @tazimmahta7625 2 роки тому +1

    8:51 ""it compares the previous props with new props. And when those props have changed it re-renders. Thats all memorization is. "". Missed that in an interview :')

  • @EnesKab
    @EnesKab 2 роки тому +1

    Thank you Jack ! I was looking forward to this. I am going to do few experiments for my own cases, but after that video, I feel better and less stressful about re-rendering I guess 😊

  • @alimohammadi1517
    @alimohammadi1517 2 роки тому +1

    Amazing content as always , really can tell that this vids are professional because of how fluent you are with the syntax , the examples and the visuals of the video overall everything is very pleasing thank you

  • @fooked1
    @fooked1 Рік тому

    Probably the best explanation on this topic.

  • @lsowein
    @lsowein 2 роки тому +1

    Thank you! I really enjoy your content. Always concise and insightful! Great editing btw :)

  • @axe-z8316
    @axe-z8316 2 роки тому +1

    wow the content is getting so much better ! great video !

  • @alisonhj
    @alisonhj 2 роки тому +1

    Thank you for your amazing explanation!
    You made it so much clear to understand!

  • @SHIVAMPANDEYSJTG
    @SHIVAMPANDEYSJTG 2 роки тому +1

    That was something I was looking for!

  • @artyomkorbut5623
    @artyomkorbut5623 2 роки тому +1

    Great video, Jack!
    Thank you so much for your work! Keep it going.

  • @trenthm
    @trenthm 2 роки тому +1

    Another great video! Thanks!

  • @ryanknight2170
    @ryanknight2170 2 роки тому +1

    Wish this video was created a long time ago! Would have sped up my understanding 10x

  • @codewithmarwan
    @codewithmarwan Рік тому +1

    Man, this video is a GEM

  • @davidkezi6086
    @davidkezi6086 2 роки тому +1

    Jack had to be my fav tech UA-camr

  • @sagarreddy7461
    @sagarreddy7461 2 роки тому +1

    Awesome, thanks jack!!

  • @philipkearney3795
    @philipkearney3795 2 роки тому +1

    Great stuff Jack!

  • @JulioDx3480
    @JulioDx3480 2 роки тому +1

    Extremely good explanations, thank you!

  • @akramadil7502
    @akramadil7502 2 роки тому +1

    Thank you, your explanation way is so amazing and I learned a lot and how you use examples is great.

  • @大盗江南
    @大盗江南 2 роки тому +1

    Great great video!! U explained the useMemo so well !!!

  • @abdelrahmanmagdy8946
    @abdelrahmanmagdy8946 2 роки тому +1

    Thank you clear explanation

  • @大盗江南
    @大盗江南 2 роки тому +1

    Hope u could have more subscribers! Great video!!! plz keep going!!

  • @444ous
    @444ous 2 роки тому +1

    Jack you are an amazing teacher! Thank you for this video!

  • @someone9493
    @someone9493 2 роки тому +1

    Superb, thank you!

  • @SkillerChampion
    @SkillerChampion 2 роки тому +1

    Thanks so much....this is a great video. I learnt alot 💯😍

  • @jijieats
    @jijieats Рік тому

    This was such a clear explaination!

  • @m3cv1no
    @m3cv1no 2 роки тому +2

    You are a badass man, keep it up 😎🔥

  • @truongpm2144
    @truongpm2144 Рік тому +1

    what amazing video, thanks you so much

  • @designdeveloprepeat651
    @designdeveloprepeat651 2 роки тому +1

    Awesome, subscribed!

  • @aryaadinulfadlan8998
    @aryaadinulfadlan8998 Рік тому +1

    amazing. i love you Jack!

  • @muhammadarsalanahmed5643
    @muhammadarsalanahmed5643 Рік тому

    Thanks, what an incredible explanation ❤