Understanding React's UI Rendering Process

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

КОМЕНТАРІ • 126

  • @cloudkungfu
    @cloudkungfu 3 роки тому +292

    So happy that the examples are of functional components

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

      😂😂

    • @DEVDerr
      @DEVDerr 3 роки тому

      Does it really matter tho?

    • @VividElites
      @VividElites 3 роки тому +25

      @@DEVDerr Yes, there's no need for the extra syntax in class components, just distracting to the eyes from the topic at hand

    • @kennyngo8706
      @kennyngo8706 3 роки тому +4

      @@DEVDerr Yeah, lifecycle methods vs hooks

    • @ninadsonawane1970
      @ninadsonawane1970 2 роки тому +18

      yeahh huge relief. this this this fucking "this" scares me

  • @WildHowlYT
    @WildHowlYT 2 роки тому +37

    In my opinion, every React Developer should watch this. Very insightful, good job!

  • @anapartybharath33
    @anapartybharath33 3 роки тому +130

    Except the little audio problem. Overall great talk !

  • @samatzhetibaev8045
    @samatzhetibaev8045 3 роки тому +53

    1:32 HTML & the DOM
    3:54 Components and elements
    11:52 Shadow DOM?
    12:10 Reconciliation
    23:25 Rendering
    25:37 React Fiber
    28:05 Conclusion

  • @jayribagchi2182
    @jayribagchi2182 Рік тому +3

    Such an awesome talk with so much of clarity! The technical nuances are hard to make anyone understand, and he did the job pretty pretty well. Thankyou for putting this out, for free. So so much to learn!🎉🎉

  • @sandipkundu5887
    @sandipkundu5887 3 роки тому +23

    As I am really new to react doing my hands-on this talk gave me a lot of confidence and knowledge as well as interest

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

      let's learn it together it's good to have react mate 👍

  • @pptxn-tv4419
    @pptxn-tv4419 2 роки тому +1

    TNice tutorials is one of the best intro soft softs I've ever seen. The entire basic worksoftow with no B.S.!

  • @shaleenchowdhary
    @shaleenchowdhary 10 місяців тому

    Anthony is genius. The talk was super helpful and informative as well, Thank you very much guys.

  • @PlamenTsilkov
    @PlamenTsilkov 3 роки тому +8

    Great stuff. Really liked the keys explanation.

  • @soy1700
    @soy1700 3 роки тому +80

    Great talk. One thing worth noting, when React is diffing list items that came from a .map(), inserting a function call like uuid() into the key property will cause rerenders everytime. The UUID will change between renders because the key is actually calling UUID every time the component's code is executed.
    You can fix this by instead generating a UUID for the object and persisting it in some state, much like you would with an ID property - which shouldn't be a big deal if you're generating the object from the frontend anyways. Just make sure not to call the function in place of the key -> add a persistent value instead.

    • @sahilkazi4518
      @sahilkazi4518 3 роки тому

      didn't get you, can you please ellaborate or point to a resource that does?

    • @soy1700
      @soy1700 3 роки тому +11

      @@sahilkazi4518 tl;dr - avoid ever doing something like key={uuid4()} in a React list item.
      The key will change on every rerender of the component, because uuid4() will be called every time. When uuid4() is called upon a rerender, the list item that you set key={uuid4()} will also be rerendered, defeating the purpose of having set a key in the first place.
      The purpose of keys is to improve efficiency by letting React know that your list item hasn't changed, and thus doesn't need to be rerendered. If your key is a random non-persistent value every time React looks at it, it will be rerendered every single time.
      This is why people often use an ID property to define a key. ID's are persistent (they will be stored in an array in state somewhere) and they are unique. You need both persistence and uniqueness for a key to work as intended

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

      More important to not use the index from a map function as the key

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

      @@kevinbatdorf why not?

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

      @@germanaquila2666 Because if the order of the objects change and the key is the index, React wont render it properly.

  • @HimanshuKumar-xz5tk
    @HimanshuKumar-xz5tk 3 роки тому +21

    This is gold. I wish he talked how diffing algorithm actually worked.

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

    This is pretty good for beginners. It’d be good to know how Fiber works in details, for instance.

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

    The best explanation of React ever!🔥🔥🔥🔥

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

    Great talk Jake Peralta!

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

    Awesome talk. This helped me a ton. Thank you!

  • @iedi3
    @iedi3 10 місяців тому +1

    awesome, i need more videos like this, deep stuff

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

    fiber talk, that's actually react Suspense now and we can actually do that. so cool.

  • @hassaannoor
    @hassaannoor 3 роки тому +1

    You cleared a lot of concepts that just didn't make sense to me earlier.

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

    This is awesome, thanks for the detailed explanation

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

    I been through loads of video's about soft . but you are the best thanks for your video's.

  • @o.h.n.o.
    @o.h.n.o. 2 роки тому +2

    Can anyone tell me if React still has this $$typeof: Symbol(react.element) for every element? I tried logging a react element (sandbox) but did not find this. I found _owner and _store instead

  • @edwinsandoval4563
    @edwinsandoval4563 3 роки тому

    Thanks for sharing this presentation, great work !

  • @Lahiru_Udana
    @Lahiru_Udana 3 роки тому +4

    Great talk. Thanks

  • @paxdriver
    @paxdriver 3 роки тому +3

    This dude should have done way more talks by now. On Symbols, on "this" binding, and service workers and stuff.

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

    Awesome stuff, thanks!

  • @ulviugur3605
    @ulviugur3605 3 роки тому +1

    Thanks a lot !!, good attempt to de-mistify the topic ! I would have preferred to see a visual summary of what happens when X changes, X being DomElement Type, keys, primitives or object values from lement props, etc. Also liking them with hooks would have been "future-proof" :)

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

    key={index} root of all my problems!!!! Thank you!

  • @a1x45h
    @a1x45h Рік тому +2

    everyone in the audience is like the same person, same dress, no expression, same messy hair 🥲

    • @spht9ng
      @spht9ng 3 місяці тому

      Welcome to the industry of developers

  • @Hamzakhan-kx2ql
    @Hamzakhan-kx2ql 2 роки тому

    thank you for sharing this presentation.

  • @maksympinchuk9057
    @maksympinchuk9057 3 роки тому +7

    Thank you, guys, thumb up from me!

  • @Gruby7C1h
    @Gruby7C1h 3 роки тому +1

    Really good talk!

  • @sidharthvyas5883
    @sidharthvyas5883 8 місяців тому

    Awesome talk, thnx alot

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

    Great talk, thanks a lot!

  • @fasolplanetarium
    @fasolplanetarium 3 роки тому

    Excellent talk, thanks!

  • @edchelstephens
    @edchelstephens 3 роки тому

    Wow! Great talk!

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

    Amazing talk! Thank you allot! But at some point I thought I forgot playback speed at 1.25

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

    Good preso; explained a lot. Is it safe to say in functional components, when a state changes via useState, the entire function (so, the entire component) gets re-run? If so, if I have a "const thing = this_depends_on_state()", thing will get recalculated when the state changes?

    • @davidchang3782
      @davidchang3782 3 роки тому

      Yes! Everything would get re calculated again

    • @HorizonHuntxr
      @HorizonHuntxr 3 роки тому +3

      Yes but only the part of the component that depends on that piece of state would get re-rendered.

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

    true hidden gem

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

    great lecture!

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

    Need more videos of him

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

    what are immersive apps?

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

    GREAT TALK!

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

    Great talk

  • @ChrisAthanas
    @ChrisAthanas 3 роки тому

    Very useful talk

  • @sunnypaul299
    @sunnypaul299 3 роки тому

    great talk

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

    Thank you.

  • @enfieldli9296
    @enfieldli9296 3 роки тому

    A good source material help me understand the component mounting and useEffect thing

  • @trueuchiha2042
    @trueuchiha2042 3 роки тому

    well explained!

  • @Vilhena6969
    @Vilhena6969 3 роки тому

    Great talk :)

  • @haseebali3810
    @haseebali3810 3 роки тому

    Informative ⚔️

  • @sensingturtle
    @sensingturtle 3 роки тому

    Super helpful!

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

    interesting video!

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

    Learn lot from the video...

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

    wonderful

  • @adventurer_v
    @adventurer_v 3 роки тому +25

    Title: "understanding react rendering". Min 26, "I actually don't know how react rendering really works with Dom" 😁

  • @cloudkungfu
    @cloudkungfu 3 роки тому +9

    Mustache moste powerful!

  • @pratikkumar939
    @pratikkumar939 3 роки тому

    Did not get much info about how React fiber works...

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

    No lie I clicked on this thinking it was an iDubbz video

  • @AjayKumar-id7mb
    @AjayKumar-id7mb 2 роки тому

    I am also facing the same problem

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

    6:07

  • @JakeJJKs
    @JakeJJKs 3 роки тому

    great talk, despite the wrong prioritization of star trek vs star wars vs space balls. lol, jk. I got a lot out of it! :)

  • @siddharthpatel6009
    @siddharthpatel6009 3 роки тому +1

    As far as i know only class components have instances.

    • @danieltkach2330
      @danieltkach2330 3 роки тому

      I think so, because technically they are objects. But functional components are functions. I will get React some day ha!

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

    problems and than volu automate the boi cuz I didn’t know how to sidechain. My one buddy produces riddim and he legit saw my daw

  • @rickharold7884
    @rickharold7884 3 роки тому

    Cool

  • @gonwms
    @gonwms 3 роки тому

    you talk at the edge of youtube normal speed

  • @SarbjeetJohal
    @SarbjeetJohal 3 роки тому +1

    He knows what he is talking about but it assumes some dev experience to follow.

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

    Idubbbz? Did you change your career?

  • @sundar_panda
    @sundar_panda 3 роки тому

    I did not know John Abraham knows reactjs

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

    If you usually change content by innerHTML, then you SHOULD switch at least to a library doing stuff for you

    • @hhlohmann3881
      @hhlohmann3881 3 роки тому

      If you are unsure how to use a library, you are one for a framework

    • @hhlohmann3881
      @hhlohmann3881 3 роки тому

      You might or need not to be the one to think about "Is it a library or a framework?"

  • @heiheichan638
    @heiheichan638 3 роки тому

    He kinda looks like idubbbz

  • @TJPBataller
    @TJPBataller 6 місяців тому

    Didn't understand a thing. any other video recommendation?

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

    IDK why but the video looks like it's from 2011.

  • @the_BetaDev
    @the_BetaDev 3 роки тому +1

    Why the children do not have $$typeof property?

    • @Jacktherippler1
      @Jacktherippler1 3 роки тому

      he did around minute 8

    • @thomasstambaugh5181
      @thomasstambaugh5181 3 роки тому

      @@Jacktherippler1 I have the same question. I reviewed the talk from 7:45 to 8:30, and didn't see or hear the answer. If you're around, could you perhaps offer a brief answer in plain text?

    • @Jacktherippler1
      @Jacktherippler1 3 роки тому +4

      @@thomasstambaugh5181 i didnt point it out but the component is a react element while the h1 is an html element. i guess u can proof it when creating a component inside a component so lets say, reactTableComponent -> contains reactTableRowComponent -> contains labels, and inspect it. also he said its for react components to add a security feature like an uuid. hope that helps

    • @thomasstambaugh5181
      @thomasstambaugh5181 3 роки тому +1

      @@Jacktherippler1 : Got it, thanks.

    • @chillimilli5116
      @chillimilli5116 3 роки тому +1

      @@Jacktherippler1 thanks a lot mate. Cheers.

  • @anirbanmaji80
    @anirbanmaji80 3 роки тому

    Why is the speaker using so much cuss words? 😁 Just kidding. Great talk.

  • @equallyavant
    @equallyavant 3 роки тому

    Sponsored by plaid shirts

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

    Unnecessary complication. Browsers need new language!

    • @spht9ng
      @spht9ng 3 місяці тому

      Pretty much all the frameworks are converging on similar patterns. Some React/Solid-like system will be built into browser standards in the near future I’m sure.

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

    владилен?

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

    Backend systems are more complicated and interesting. This talk is about Virtual 🏡 which is also interesting and also very simple concept.

  • @atsourno
    @atsourno 3 роки тому +4

    Thumbs up if you were using key = { index } the wrong way.

  • @olezhonnv3215
    @olezhonnv3215 3 роки тому +4

    Ok, so it is expensive to manipulate the DOM.
    But React must manipulate the DOM to render a component.
    So, without react, you manipulate the DOM. And, using react, you indirectly manipulate the DOM.
    But react adds its virtual dom and reconciliation in addition to actual DOM manipulations.
    Where is the performance? DOM MUST be manipulated, with react or without react.

    • @type3gaming851
      @type3gaming851 3 роки тому +4

      With the help of virtual dom it knows what to manipulate and what doesn't need to change. Without react even for a small change the DOM is getting rendered from scratch.

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

      @@andTutin Yes you are right, it's been a long time since I've made that comment lol. Now i know.

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

      @@andTutin prove what

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

      @@andTutin Yeah bruh that's not happening, earlier sometime told me that so i believed. Now i know i was wrong. You can chill.

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

    I am surprised how much he swears given that it's a conference talk...

  • @THEkarankaira
    @THEkarankaira 3 роки тому +1

    popatlal?

  • @PavanMuppala
    @PavanMuppala 3 роки тому

    this looks like flutter

  • @rustalisin8950
    @rustalisin8950 3 роки тому +1

    all good, but when talking about key & ref string option, why not say why null is used for beginners Assume nothing, it costs u 5 sec , how do u use it with null ? thats what views need .. also to "access a 3rd party library writing attributes to a DOM node" WTF how about this is where u put a hook or address reference to access a 3rd party lib.. why do good scripters confuse the fine detail ? "we have a h1 , an ID as title, & we return it.
    in teaching simple component, a new user asks why do u return it before calling it ( ) the 1st line = ( ) => needs 5 sec clarity, as when a component runs State / Procs or Props.. a constant living organism? scary (explain how that component comes to life , How hard is it

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

    Audio is breaking for this video.

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

    Except the little audio problem. Overall great talk !