How Does React Actually Work? React.js Deep Dive #1
ฝัง
- เผยแพร่เมื่อ 16 มิ.ย. 2024
- Have you ever wondered, how does React actually work? In this video, we will explore what is really happening behind the scenes. First, we will learn about React elements, components and component instances. Then, we will move to React Reconciliation along with the Diffing algorithm, which is the very core of React. Afterwards, we will move to rendering and to the renderers themselves, looking specifically at React DOM. Finally, we will learn about the ways React communicates with the renderers.
Timestamps:
0:00 Introduction
0:35 React components, elements and component instances
5:34 Reconciliation
7:11 The Diffing algorithm
11:00 Rendering
12:23 How React communicates with the renderers
14:12 Ending
Notes:
Check what is happening behind the scenes: babeljs.io/repl
The $$typeof property: overreacted.io/why-do-react-e...
Create your own renderer: reactjs.org/docs/test-rendere...
Social Media:
►Twitter: / philip_fabianek
►LinkedIn: / philip-fabianek
►Website: www.philipfabianek.com
►GitHub: github.com/philipfabianek
Music:
Lodhi by Pali Gap / pali_gap
Creative Commons - Attribution 3.0 Unported - CC BY 3.0
Free Download / Stream: bit.ly/lodhi-pali-gap
Music promoted by Audio Library • Lodhi - Pali Gap (No C...
Lights Of Elysium - AERØHEAD / aerohead
Creative Commons - Attribution-ShareAlike 3.0 Unported - CC BY-SA 3.0
Free Download / Stream: bit.ly/lights-of-elysium
Music promoted by Audio Library • Lights Of Elysium - AE...
Solace by Nomyn / nomyn
Creative Commons - Attribution 3.0 Unported - CC BY 3.0
Free Download / Stream: bit.ly/SolaceNomyn
Music promoted by Audio Library • Solace - Nomyn (No Cop...
#ReactJS #ReactDeepDive - วิทยาศาสตร์และเทคโนโลยี
This video made me realize that I'm standing on the shoulders of giants whenever I'm developing in React. Facebook devs are magicians
Great content! I think this is the only video available in youtube that talks about the React principle and at the same time is friendly to beginners. Keep up the good work. The video serves really well for people who wanna dive into the source code of React while have no idea where to start.
Thank you!
Finally! I've been looking for this series for the past week. Great stuff Philip 😁
I wasn't expecting the background music. Probably the first coding tutorial with music. Worked like magic. Thank you :)
10/10. So well done can't wait to watch the rest of this series, bravo.
This youtuber definitely deserves more subscribers! Awesome content! Looking forward to seeing more coming out!
Amazing content - I can see more clearly what is going on with renders and generally better understand the reconciliation process. Thank you 🙏
One of the best videos for those who want to dive deep into the React and the source code.
crisp and clear, loved the explanation!
This is gold stuff, I believe it not available any where.
Please bring more videos like this
the most accurate video i've watched on this topic so far , good job
I have worked as a React developer for four years and I never understood why you have to import React and neither why you can't use the index as a key. Very good and clear explanations. I will have an interview for a React job on monday and this definitely helps me! Thank you! 😃
This is amazing ❤. This is the only video I’ve seen which has explained this on a practical level
The best video I have found about this topic on TH-cam!! Great work! 😁
Thank you!
Big thanks man. Exactly the understanding I was looking for. Really well done.
This is amazing !!!!! Thank you so much man. This really helped me clearing so many doubts related to react.
This is amazing, I checked lots of times if I have already pressed like during watching this, thank you!
actully this one of the greatest videos about react. thanks for this amazing content , can't wait to see more.
Nice brief high-level overview of the source code and core deep fundamentals
This type of quality and depth is hard to find easily and for free. Thank you for your understanding and great explanation.
the much deeper dive, the better
thanks
Thank you, glad it was helpful!
What an elegantly explained video. Bravo
great content...even watching this single tutorial, learned much more than reading articles online...
Incredible content, I daresay this was never explained better! Thank you 🙏🏽
Thank you!
Philip this was awesome. I have been an educator for over 15 years and love watching others present information. Your use of the calming background music, imagery, and the pace of your voice definitely put my mind in a place to absorb the content easily. Please continue to bring us more information. Instantly subscribed!!!
Thank you!
It's so smooth I just replayed the video to check the music 😅
Super awesome & fantastic lessons, rarely encounter such a deep dive React tutorial on TH-cam.
Thank you very much!
Thank's a lot for this React deep dive - I myself would not have been able to dive so deep into react!
Thank you!
I've switched from Angular to React. This video is very helpful. Thank you for sharing your knowledge ;)
awesome! This is the best React video I have ever seen
Great work. Thank you for the detailed explanation 💜
It was really very insightful. Learned a lot in those 15 minutes. Thanks for that Philip.
Thank you for the kind words.
Before this, I was working BLINDLY on React and any other library or framework that is out their. This very content opened my EYES 👀.
I've never seen such an informative video about React before. Thank you very much for presenting such a video to us.
Thank you for watching, glad it was helpful 🙂
Great video Philip! Thanks!
Your channel is a work of art.I'm new to your channel.I've been learning Reactjs for about like 4 months and i was looking for like how React works behind the scenes .Your channel is a masterpiece.Thank you so much.Can we expect like Nextjs series Deep dive series if you have times sir?Thank you....
omg, much of information in the video killed confusions, really helped a lot.❤❤❤
Best content! clear and concise, I've never seen. thanks for your sharing!
Thank you very much!
Brilliant content. World-class content. Keep it up Philip, it's amazing.
Thank you, much appreciated!
Awsome work ! keep going this !
Loving this DEFFING ALGORITHM. Thanks mate
Great video , thanks brother it helped alot to understand react better.
Thanks for such a great content Philip!🖖
This is friggin' awesome! Thank you.
Indeed, it was the best video on this topic, take my gratitude, sir!
Thank you!
It is the greatest explanation I have seen! I say it, as I have just kind of ended self-learning JavaScript and was wondering about React.js's hard-mode. It is good that you show it like that, because when I have seen the other's 'let's create-react-app' and so on, I just felt as if I forgot all I knew!
I have to switch, due to war. Even my 2 diplomas are just for fun. That is where English and German are useful.
Thank you, Philip! My best friend lives in Prague since 2008. He helps me in learning, but I couldn't have understood React, even with his help! You have helped! Great
Thank you!
This is so great. The explain is very simple and clear. Thanks author, you make my days much easier and saved my time.
Thank you!
Very interesting and helpful, thank you! Keep up the good work!
Thank you!
Thank you Philip, you cleared a lot of my confusions :))
Awesome. Keep up the good work
Thank you... Really informative 👍
Excellent explanation! Very clear & structrured!
Thank you!
Pure GOLD! subscribed!
Thank you for your videos, those information are not easy to find on TH-cam because in general people explain only how to use things without explaining it
Very informative, please keep making videos like this. Cheers man
Thank you!
great explanation. Thanks so much
One of the best insights of react internals (even I couldn't found this kind of info in paid course's as well), amazing work Philip Thank you so much for such a great series.
Thank you! I am actually considering making a course (~ 10 hours) that would focus exclusively on React internals
@@PhilipFabianek That sounds great. I'm waiting for the updates about the course
@@PhilipFabianek Hey Philip , Any updates on the course . I will be the first to purchase ..Your teaching style is awesome !
incredible explanation!
15 mins of pure beauty, thanks a lot
Thank you!
Wow this is god sent..... Best video on this subject❤❤
Awesome content!!
great series on internals. please keep showing us react guts
Amazing content, you explained it properly with amazing brevity and clarity. I am interested in the internals of redux or any state management say useReducer/useContext
Your video's are really helpful, I am searching for the video's of this kind.keep videos of this kind.really informative
Thank you!
This video deserves million views.
premium level content bro !
Have to say bunch of words about this video but not have much time to do it. You did a great job that I can't explain. Keep it up your great work. Have subscribed your Channel 👍
Thank you!
This is really awesome content .
Amazing! Tks for share.
The Best 'React Under the Hood' explanation!!
Thank you!
Man, thank you so much for this video. I finally understand React
great explanation!!!!
Great Job! Awesome explanation!
Thank you!
Thank you for this video.its clearly explained about react basics.
Bro, why didn't I see you earlier ? Why TH-cam isn't showing more of your content in suggestions ?
This content is lit, complete lit.
Thank you man for this awesome content.
Thank you!
Great content!
Great Video!
Great video series! Very much needed :) One thing I'd love to understand a bit better is component instances. What is the relationship between elements and instances? Where does React keep its references to the component instances? In the element tree somewhere? The 'ref'?
The relationship between React elements (the ones that have the function type which returns the nested elements) and instances is 1-to-1. For each element that describes a component, there exists a component instance.
About the second question: Instances exist in memory. We as React developers can access class instances using the 'this' keyword or lifecycle methods. This works because an instance of a class component is an actual instance of the class afterall. We can access functional component instances using React hooks. We can also create refs.
What you are asking is how does React access them or how are they stored internally. The answer is that this is 1 level below what we are talking about. It has a lot to do with React Fiber, which I covered in the next episode of this deep dive (th-cam.com/video/0ympFIwQFJw/w-d-xo.html). Fibers keep actual references to component instances in the 'stateNode' property. I think this answer on Stack Overflow is what you are looking for: stackoverflow.com/a/58968770/8699608 The function in the answer can retrieve the component instance from the actual element in the DOM.
Great video! Thank you
This is pure gold
Man you rock. So cool explanation!
Thank you!
Thank you for the amazing video, now I have a better understanding of React
Subscribed!
More React internals content please!!
Thanks. Very useful content!
WOW AMAZING , This video is full of tons of knowledge. Thank you so much sir.
Thank you!
Thank you for this video it was very helpful.
Fantastic, and great music
awsome video thanx from south korea!!
Great video!! Super helpful.
Thank you!
Nice video !!! 👏
thank you! we need to understand how does react really work in order to use it properly!!
great topic, thanks
Great video, thanks man!
Thank you!
Best I've seen yet!. I have a slight confusion at 10:58 is that "reconciliation" or "diffing" ? I was of the impression that react does the diffing, and reactDom does the reconciliation part.
Diffing is part of reconciliation. Check out reactjs.org/docs/reconciliation.html
Thank you, now I can understand more about react
Thank you!
Hey Philip, your whole series on React is great! Now I can actually understand what's happening behind the scenes...Just a question: would you mind sharing how do you create these videos-Do you do screen recording of a presentation? I am planning to make dev tutorial myself and it would be really helpful. Cheers!
Thank you! I produce my videos in Premiere Pro, where I add texts, images, icons and animate them to make everything look nice.
@@PhilipFabianek Thank you!
Awesome explanation with one caveat at 7:30. The diffing algorithm has a complexity of _O(n)_ which does *not* mean that the number operations will be smaller than (n). Instead it means that the number of operations will be (
Yes you are correct.
Your videos are like oxygen to us'🧡🧡
Thank you!
great video! I love the 3blue1brown kinda style applied to programming.
Thank you very much! I have watched quite a few videos from 3b1b and they had an impact on me.
Your ability to simplify and communicate knowledge is extraordinary!
Could you tell me what tools you use to produce these videos?
Thanks a lot
Thank you! I use Premiere Pro for video and audio editing, optionally Adobe Audition for other audio changes.
Great Video
very insightful and knowledgeable video
Thank you!