How Does React Actually Work? React.js Deep Dive #1

  Рет қаралды 130,430

Philip Fabianek

Philip Fabianek

Күн бұрын

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

Пікірлер: 248
@TheZayzoo
@TheZayzoo Жыл бұрын
This video made me realize that I'm standing on the shoulders of giants whenever I'm developing in React. Facebook devs are magicians
@ffking1357b
@ffking1357b 2 жыл бұрын
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.
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@StatisticsTheory
@StatisticsTheory 6 ай бұрын
Finally! I've been looking for this series for the past week. Great stuff Philip 😁
@Aliena92
@Aliena92 Жыл бұрын
I wasn't expecting the background music. Probably the first coding tutorial with music. Worked like magic. Thank you :)
@tylermyers8735
@tylermyers8735 Жыл бұрын
10/10. So well done can't wait to watch the rest of this series, bravo.
@szymonrojek6480
@szymonrojek6480 Жыл бұрын
Amazing content - I can see more clearly what is going on with renders and generally better understand the reconciliation process. Thank you 🙏
@christianolsson8644
@christianolsson8644 8 ай бұрын
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! 😃
@prathameshkhetre1494
@prathameshkhetre1494 4 ай бұрын
crisp and clear, loved the explanation!
@GauravYadav-rv7wx
@GauravYadav-rv7wx 2 жыл бұрын
This is gold stuff, I believe it not available any where. Please bring more videos like this
@0xmorfu
@0xmorfu 2 жыл бұрын
Big thanks man. Exactly the understanding I was looking for. Really well done.
@bradleyli1569
@bradleyli1569 8 ай бұрын
This youtuber definitely deserves more subscribers! Awesome content! Looking forward to seeing more coming out!
@ajeeteppakayala6788
@ajeeteppakayala6788 2 жыл бұрын
One of the best videos for those who want to dive deep into the React and the source code.
@ramshankarkumar4222
@ramshankarkumar4222 2 жыл бұрын
This is amazing !!!!! Thank you so much man. This really helped me clearing so many doubts related to react.
@webb-developer
@webb-developer Жыл бұрын
the most accurate video i've watched on this topic so far , good job
@hichamelkamouni9910
@hichamelkamouni9910 Жыл бұрын
actully this one of the greatest videos about react. thanks for this amazing content , can't wait to see more.
@zb2747
@zb2747 Жыл бұрын
Nice brief high-level overview of the source code and core deep fundamentals
@deepeshnair
@deepeshnair 8 ай бұрын
This is amazing ❤. This is the only video I’ve seen which has explained this on a practical level
@harshitadhingra225
@harshitadhingra225 2 жыл бұрын
The Best 'React Under the Hood' explanation!!
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@kevinfreeman9652
@kevinfreeman9652 Жыл бұрын
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!!!
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Thank you!
@lilithfirefly3727
@lilithfirefly3727 Жыл бұрын
It's so smooth I just replayed the video to check the music 😅
@aaadesh
@aaadesh Жыл бұрын
Thanks for such a great content Philip!🖖
@uuu06222
@uuu06222 Жыл бұрын
This is amazing, I checked lots of times if I have already pressed like during watching this, thank you!
@hariharan3469
@hariharan3469 11 ай бұрын
Loving this DEFFING ALGORITHM. Thanks mate
@lilithfirefly3727
@lilithfirefly3727 Жыл бұрын
Great work. Thank you for the detailed explanation 💜
@zahidshaikh3122
@zahidshaikh3122 3 ай бұрын
Before this, I was working BLINDLY on React and any other library or framework that is out their. This very content opened my EYES 👀.
@saulnewbury4631
@saulnewbury4631 Жыл бұрын
This is friggin' awesome! Thank you.
@netcomputers6529
@netcomputers6529 Жыл бұрын
great content...even watching this single tutorial, learned much more than reading articles online...
@user-ki9ru5kf8s
@user-ki9ru5kf8s Жыл бұрын
awesome! This is the best React video I have ever seen
@19jnz08
@19jnz08 Жыл бұрын
I've switched from Angular to React. This video is very helpful. Thank you for sharing your knowledge ;)
@chrisschuller7055
@chrisschuller7055 2 жыл бұрын
The best video I have found about this topic on KZbin!! Great work! 😁
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@timjobs9072
@timjobs9072 2 жыл бұрын
omg, much of information in the video killed confusions, really helped a lot.❤❤❤
@samggez
@samggez 8 ай бұрын
Pure GOLD! subscribed!
@dx.dhafer
@dx.dhafer 2 жыл бұрын
Incredible content, I daresay this was never explained better! Thank you 🙏🏽
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@EBay_Dev
@EBay_Dev 2 жыл бұрын
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
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you, glad it was helpful!
@hashim_hahsimli_95
@hashim_hahsimli_95 10 ай бұрын
Great video Philip! Thanks!
@k303k
@k303k 11 ай бұрын
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....
@billchen4923
@billchen4923 2 жыл бұрын
Super awesome & fantastic lessons, rarely encounter such a deep dive React tutorial on KZbin.
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you very much!
@ngocthile1001
@ngocthile1001 Жыл бұрын
great explanation. Thanks so much
@hansschenker
@hansschenker 2 жыл бұрын
Thank's a lot for this React deep dive - I myself would not have been able to dive so deep into react!
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@Serzes_
@Serzes_ Жыл бұрын
Thank you for your videos, those information are not easy to find on KZbin because in general people explain only how to use things without explaining it
@mehmetturgutgezgin6439
@mehmetturgutgezgin6439 2 жыл бұрын
I've never seen such an informative video about React before. Thank you very much for presenting such a video to us.
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you for watching, glad it was helpful 🙂
@DiaryOfMuhib
@DiaryOfMuhib Жыл бұрын
Awesome. Keep up the good work
@nextleveltech267
@nextleveltech267 3 ай бұрын
Thank you... Really informative 👍
@nguyentruong1812
@nguyentruong1812 Жыл бұрын
Thank you Philip, you cleared a lot of my confusions :))
@naturalguardian5885
@naturalguardian5885 4 ай бұрын
Awsome work ! keep going this !
@mrwick2op
@mrwick2op 5 ай бұрын
Great video , thanks brother it helped alot to understand react better.
@zhenghongjiang5862
@zhenghongjiang5862 2 жыл бұрын
Best content! clear and concise, I've never seen. thanks for your sharing!
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you very much!
@pq6688
@pq6688 2 жыл бұрын
Brilliant content. World-class content. Keep it up Philip, it's amazing.
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you, much appreciated!
@IsraelAgyemanPrempeh
@IsraelAgyemanPrempeh Жыл бұрын
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
@sanjeettiwari9000
@sanjeettiwari9000 2 жыл бұрын
It was really very insightful. Learned a lot in those 15 minutes. Thanks for that Philip.
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you for the kind words.
@MrRobot-mb6rq
@MrRobot-mb6rq Жыл бұрын
This video deserves million views.
@user-fg6ng7ej6w
@user-fg6ng7ej6w Жыл бұрын
great series on internals. please keep showing us react guts
@LyczeQQ
@LyczeQQ Жыл бұрын
Man, thank you so much for this video. I finally understand React
@gowriramasamy674
@gowriramasamy674 2 жыл бұрын
Thank you for this video.its clearly explained about react basics.
@Dipenparmar12
@Dipenparmar12 Жыл бұрын
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.
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Thank you! I am actually considering making a course (~ 10 hours) that would focus exclusively on React internals
@lilithfirefly3727
@lilithfirefly3727 Жыл бұрын
@@PhilipFabianek That sounds great. I'm waiting for the updates about the course
@devendrapandey4557
@devendrapandey4557 Жыл бұрын
@@PhilipFabianek Hey Philip , Any updates on the course . I will be the first to purchase ..Your teaching style is awesome !
@chans9055
@chans9055 Жыл бұрын
Thank you for the amazing video, now I have a better understanding of React
@StryKhymorodnyk
@StryKhymorodnyk Жыл бұрын
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
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Thank you!
@zGrowthLabs
@zGrowthLabs 3 ай бұрын
incredible explanation!
@jonasoo7113
@jonasoo7113 8 ай бұрын
Wow this is god sent..... Best video on this subject❤❤
@andreigatej6704
@andreigatej6704 3 жыл бұрын
Very interesting and helpful, thank you! Keep up the good work!
@PhilipFabianek
@PhilipFabianek 3 жыл бұрын
Thank you!
@zoltancaputo9562
@zoltancaputo9562 Жыл бұрын
Amazing! Tks for share.
@bushbuddyplatypus
@bushbuddyplatypus 9 ай бұрын
Fantastic, and great music
@VovanFraer
@VovanFraer Жыл бұрын
Indeed, it was the best video on this topic, take my gratitude, sir!
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Thank you!
@wxq521
@wxq521 2 жыл бұрын
This is so great. The explain is very simple and clear. Thanks author, you make my days much easier and saved my time.
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@captainalpha4853
@captainalpha4853 2 жыл бұрын
Very informative, please keep making videos like this. Cheers man
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@umairqamar2672
@umairqamar2672 Жыл бұрын
premium level content bro !
@VladimirJovana
@VladimirJovana Жыл бұрын
15 mins of pure beauty, thanks a lot
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Thank you!
@satyamchatterjee1074
@satyamchatterjee1074 Жыл бұрын
Bro, why didn't I see you earlier ? Why KZbin isn't showing more of your content in suggestions ? This content is lit, complete lit. Thank you man for this awesome content.
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Thank you!
@kiefer8101
@kiefer8101 Жыл бұрын
Subscribed! More React internals content please!!
@DemystifyFrontend
@DemystifyFrontend 4 ай бұрын
This is really awesome content .
@mykolao
@mykolao Жыл бұрын
This is pure gold
@nneddenn6207
@nneddenn6207 Жыл бұрын
Excellent explanation! Very clear & structrured!
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Thank you!
@AleySoundz
@AleySoundz 5 ай бұрын
Thank you for this video it was very helpful.
@flatulenzedellamente
@flatulenzedellamente 2 жыл бұрын
thank you! we need to understand how does react really work in order to use it properly!!
@dovahkiin3362
@dovahkiin3362 9 ай бұрын
this is gold
@eegaramesh3093
@eegaramesh3093 2 жыл бұрын
Your video's are really helpful, I am searching for the video's of this kind.keep videos of this kind.really informative
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@illyapelypenko3190
@illyapelypenko3190 Жыл бұрын
Man you rock. So cool explanation!
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Thank you!
@vatsee
@vatsee 2 жыл бұрын
Thanks. Very useful content!
@omarpervez5657
@omarpervez5657 3 ай бұрын
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 👍
@PhilipFabianek
@PhilipFabianek 3 ай бұрын
Thank you!
@bjornstabell2970
@bjornstabell2970 2 жыл бұрын
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'?
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
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 (kzbin.info/www/bejne/ZqrQoXl_rLZ5gNk). 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.
@MrAdityaSingal
@MrAdityaSingal 4 ай бұрын
Awesome content!!
@diegazo5556
@diegazo5556 2 жыл бұрын
Great Job! Awesome explanation!
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@mohammadnoushadsiddiqui4786
@mohammadnoushadsiddiqui4786 2 жыл бұрын
WOW AMAZING , This video is full of tons of knowledge. Thank you so much sir.
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@ramanpreetsingh186
@ramanpreetsingh186 2 ай бұрын
great explanation!!!!
@trannhathao3978
@trannhathao3978 2 жыл бұрын
Thank you, now I can understand more about react
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@ubayabdelgadir4165
@ubayabdelgadir4165 Жыл бұрын
Thank you very much, I was wondering how react native was possible, but you elegantly explained that react is not a platform specific, and it does not actually render to HTML without another separate library 11:22.
@AjithKumarsham
@AjithKumarsham 2 жыл бұрын
Great video, thanks man!
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@deep_swamp
@deep_swamp Жыл бұрын
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 (
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Yes you are correct.
@nghiatranthanh3806
@nghiatranthanh3806 Жыл бұрын
Great video! Thank you
@danieldesales377
@danieldesales377 Ай бұрын
Great content!
@sumitbhutani5606
@sumitbhutani5606 3 жыл бұрын
Great video!! Super helpful.
@PhilipFabianek
@PhilipFabianek 3 жыл бұрын
Thank you!
@frankdearr2772
@frankdearr2772 Ай бұрын
great topic, thanks
@muhammadbilalmalik7292
@muhammadbilalmalik7292 2 жыл бұрын
Your videos are like oxygen to us'🧡🧡
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@marcframe7449
@marcframe7449 2 жыл бұрын
great video! I love the 3blue1brown kinda style applied to programming.
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you very much! I have watched quite a few videos from 3b1b and they had an impact on me.
@RankMotion
@RankMotion Жыл бұрын
Your ability to simplify and communicate knowledge is extraordinary! Could you tell me what tools you use to produce these videos? Thanks a lot
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Thank you! I use Premiere Pro for video and audio editing, optionally Adobe Audition for other audio changes.
@ananditvashist1778
@ananditvashist1778 Жыл бұрын
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!
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Thank you! I produce my videos in Premiere Pro, where I add texts, images, icons and animate them to make everything look nice.
@ananditvashist1778
@ananditvashist1778 Жыл бұрын
@@PhilipFabianek Thank you!
@programmingwithnit5308
@programmingwithnit5308 Жыл бұрын
Thank you brother 🙏🙏
@vishalkuwar6579
@vishalkuwar6579 5 ай бұрын
wohh what a informative video. Just great!!!!. I dont Know why you stopped making videos but you should make more videos/
@PhilipFabianek
@PhilipFabianek 5 ай бұрын
Thank you, I am currently very busy but there will be videos in the future
@gbenga9811
@gbenga9811 2 жыл бұрын
This is a pretty good explanation of how React works under the hood. Thanks a lot for taking the time to explain each concept in detail.
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you, glad it was helpful!
@mathewvarkey5102
@mathewvarkey5102 2 жыл бұрын
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.
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Diffing is part of reconciliation. Check out reactjs.org/docs/reconciliation.html
@meetpatel8751
@meetpatel8751 7 ай бұрын
Nice video !!! 👏
What Is React Fiber? React.js Deep Dive #2
18:56
Philip Fabianek
Рет қаралды 52 М.
Не пей газировку у мамы в машине
00:28
Даша Боровик
Рет қаралды 4,8 МЛН
How React ACTUALLY works (DEEP DIVE 2023)
12:59
FrontStart
Рет қаралды 45 М.
How does the INTERNET work? | ICT #2
8:59
Lesics
Рет қаралды 8 МЛН
This is the Only Right Way to Write React clean-code - SOLID
18:23
How do React Hooks really work? Let's build useState from scratch!
13:29
SMOOSHCAST: React Fiber Deep Dive with Dan Abramov
1:47:08
Smoosh Comedy
Рет қаралды 95 М.
How React Works behind the scenes - Pluralsight audition
9:35
Code With Sandip
Рет қаралды 37 М.
Beginner React.js Coding Interview (ft. Clément Mihailescu)
36:31
Ben Awad
Рет қаралды 2,1 МЛН
React Fiber Reconciliation: How it Works (Part 1)
13:43
Tejas Kumar
Рет қаралды 8 М.
Купите ЭТОТ БЮДЖЕТНИК вместо флагманов от Samsung, Xiaomi и Apple!
13:03
Thebox - о технике и гаджетах
Рет қаралды 57 М.
Индуктивность и дроссель.
1:00
Hi Dev! – Электроника
Рет қаралды 357 М.
СЛОМАЛСЯ ПК ЗА 2000$🤬
0:59
Корнеич
Рет қаралды 2,3 МЛН