What Is React Fiber? React.js Deep Dive #2

  Рет қаралды 53,489

Philip Fabianek

Philip Fabianek

Күн бұрын

In this video, we will learn about the current React reconciler - the Fiber reconciler. This reconciler is based on the Fiber object. React Fiber is a complete rewrite of React that fixes long-standing issues (React being synchronous) and offers incredible opportunities heading into the future. It focuses on animations and responsivness. Features like Error boundaries, Suspense and Concurrent Mode are all based on Fiber.
Fiber is just a plain JavaScript object, however, it also represents a unit of work. Fibers are processed in two phases: the render phase and the commit phase. During the render phase, React processes Fibers asynchronously and this opens up a world of possibilities. Fibers have many properties. We will learn about 'tag', 'stateNode', 'child', 'sibling', 'return' and many more. We will also learn about the Fiber tree and how React processes it. Finally, we will learn about Effects, which are processed during the synchronous commit phase. Effects are DOM mutations or lifecycle methods.
Timestamps:
0:00 Introduction
0:54 Old reconciler - Stack
2:02 What does Fiber do?
2:32 Two Fiber phases (render phase and commit phase)
4:24 Fiber 'tag' property
5:30 Fibers vs React elements
6:20 Fiber relationships ('child', 'sibling' and 'return' properties)
8:20 What is work?
9:49 Fiber trees (current and workInProgress)
10:57 Effects
13:32 How React processes a Fiber tree
16:24 Fiber 'alternate' property
16:56 React Fiber usage (Error boundaries, Suspense, Concurrent Mode)
17:56 Ending
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 #ReactFiber #ReactDeepDive

Пікірлер: 87
@uhmindset
@uhmindset Жыл бұрын
Please continue creating these kinds of video, This really helps to understand the core React Concepts and getting a vast amount of knowledge from the core. Thank you.
@mehmetturgutgezgin6439
@mehmetturgutgezgin6439 2 жыл бұрын
I wish I had a lecturer like you, I hope these videos will continue. Thanks for sharing your knowledge in such a detailed and understandable way.
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you for watching!
@NahuelVeron
@NahuelVeron 2 жыл бұрын
This channel is really underrated, great work!
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you very much!
@lucretius1111
@lucretius1111 2 жыл бұрын
Incredibly useful! One of the best explanations of fiber that i've seen.
@xiaoyuwang8446
@xiaoyuwang8446 Жыл бұрын
简直太棒了,每个视频我都要看三遍以上,太喜欢你的解读方式了,希望能多出一些讲解视频!
@karpo1180
@karpo1180 Жыл бұрын
I like your clear and concise explanation of React Fiber and this ambient music on the background :)
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Thank you
@harendrasharma8107
@harendrasharma8107 2 жыл бұрын
this is literally very under-rated channel , this is outstanding explanation of this much of complicated topic. thanks @philip keep up the good work.
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you very much!
@mdtanviralam7571
@mdtanviralam7571 3 ай бұрын
Fantastic explanation detailing React Fiber-very helpful! Please continue creating this kind of video content.
@twentysixhugs
@twentysixhugs Жыл бұрын
Thank you. Your video is concise and very to-the-point. You've done a great job making it.
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Thank you!
@duytannguyen8849
@duytannguyen8849 2 жыл бұрын
Awesome videos!!! I am so lucky when finding out your channel, your videos are very interesting and helpful! Thanks so much man!
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Awesome, thank you!
@williamabboud
@williamabboud Жыл бұрын
Great work on this video! Very informative, thank you!
@pushpabaiwankhade7207
@pushpabaiwankhade7207 Жыл бұрын
This is really outstanding work!
@maximmalakhov7674
@maximmalakhov7674 10 ай бұрын
Thank you very much. It's a very good Fiber explanation.
@user-mb1jg9bq9u
@user-mb1jg9bq9u Жыл бұрын
I should know your channel early, great work! Thanks.
@user-kn6no9hz4o
@user-kn6no9hz4o 3 ай бұрын
Very usefull and clear video, thank you!
@OmnispectiveHub
@OmnispectiveHub Жыл бұрын
Please continue with tis content, it's so good
@aaadesh
@aaadesh Жыл бұрын
Wow, you've made it so simple thx.
@antonrusak3207
@antonrusak3207 2 жыл бұрын
Background music is really pacifying and non-interruptive. Thanks for explaining, good sir.
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you for the feedback!
@user-ky5ig8sv1l
@user-ky5ig8sv1l 2 жыл бұрын
Best ever explanation about fiber. Thanks!
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@resetengineering
@resetengineering Жыл бұрын
Great video. Wish you had spoken about performance a bit more. The fact that suspense is mentioned gives a hint to users like me...but I would have to dig in separately
@ckorina_top2456
@ckorina_top2456 3 жыл бұрын
Very very goood man! I'm waiting for a video about hooks behind the scenes!
@PhilipFabianek
@PhilipFabianek 3 жыл бұрын
Thank you! I'm currently working on the video about React Hooks
@kehindefasunle4933
@kehindefasunle4933 2 жыл бұрын
The animation made it understandable. Good job 👌
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@kehindefasunle4933
@kehindefasunle4933 2 жыл бұрын
I was going to ask if we can work with the fiber directly.
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
It is possibe but there is no reason to do so, because Fiber is just the internal part of React after all.
@mohdhaziq9859
@mohdhaziq9859 2 жыл бұрын
Hey thanks for really good animation. Quite easy to understand :D
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@milospavlovic3728
@milospavlovic3728 2 жыл бұрын
Wooah. Superb explanation, keep it up dude, I learned a lot from you videos. Thanks you and will subscribe immediately!
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@borjinator
@borjinator 10 ай бұрын
This series is top notch. I would like to send you a kofi or something in appreciation.
@PhilipFabianek
@PhilipFabianek 10 ай бұрын
Thank you! If you want to support me, I do actually have a Kofi account at ko-fi.com/philipfabianek
@IsraelAgyemanPrempeh
@IsraelAgyemanPrempeh Жыл бұрын
Your videos need to be added to the new beta docs
@dearozero3631
@dearozero3631 Жыл бұрын
This is incredible content.
@tmanley1985
@tmanley1985 6 ай бұрын
This is amazing content.
@i_dont_likevodka3062
@i_dont_likevodka3062 Жыл бұрын
thanks for the video!
@js-noob
@js-noob 3 ай бұрын
Please create more videos!!
@Johnwick-9996
@Johnwick-9996 9 ай бұрын
I came in search of silver but I found gold, thanks
@dixztube
@dixztube Жыл бұрын
Great job!
@namansaxena5021
@namansaxena5021 2 жыл бұрын
Hi Philip, your this "How does React actually work" playlist is really informative. Thanks for the playlist, I learned new things about React. I have 1 doubt and would really appreciate if you could answer, when you use term "Fiber Tree" and discuss that there will be 2 trees (Current Tree & Work In Progress Tree) , is it a replacement of Real DOM & Virtual DOM concept in newer versions of React? Or is it something else? My understanding was, there is Real DOM and Virtual DOM, React make changes to Virtual DOM on state change and compares updated Virtual DOM with the snapshot of Virtual DOM before update, then it updates that new component on Real DOM. Virtual DOM is not displayed on screen. But in Fiber Tree concept, you said that 2 trees will keep swapping, so if they are being displayed, that means current Tree will act like Real DOM with all content and work In Progress Tree will act like Virtual DOM which would be lightweight copy of currentTree. But because work In Progress Tree will eventually become current Tree, that means it is NOT a lightweight copy, it is an actual thing, right? And is Fiber Tree related to Real & Virtual DOM or is it something else? I got a little confused about Fiber Tree concept and how it will fit in Real and Virtual DOM concept. 😅
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
The Real / Virtual DOM and the Fiber tree are 2 different things. While the Fiber tree really is the foundation of React (Fiber tree is being used behind the scenes), Virtual DOM is more of a programming concept or a pattern.
@namansaxena5021
@namansaxena5021 2 жыл бұрын
@@PhilipFabianek Thanks a lot, I finally got it! 😄 Even in React docs, it is written, that fibers can be considered part of Virtual DOM. "React, however, also uses internal objects called “fibers” to hold additional information about the component tree. They may also be considered a part of “virtual DOM” implementation in React." Thanks again, I really learned a lot from your playlist. Subscribed 😎
@CrusaderMen
@CrusaderMen 10 ай бұрын
Thank you!
@WomboBraker
@WomboBraker Жыл бұрын
man you are amazing
@js-noob
@js-noob 3 ай бұрын
please create more videos!!!
@kamiladamczyk9369
@kamiladamczyk9369 2 жыл бұрын
The English is a little bit clunky, but the quality of the knowledge and the presentation is extraordinary. Keep up the good work!
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@ivanliszewski2247
@ivanliszewski2247 2 жыл бұрын
Awesome video 🙌🏼
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@anshi3948
@anshi3948 Жыл бұрын
wow,it's absolutely a really helpful video, and i just have one question for another asepect, how could you learn the deep dive knowledge about react, could you share the way you learn it?
@PhilipFabianek
@PhilipFabianek Жыл бұрын
In terms of React Fiber, I would suggest reading this article: indepth.dev/posts/1008/inside-fiber-in-depth-overview-of-the-new-reconciliation-algorithm-in-react
@higorcoimbra6591
@higorcoimbra6591 Жыл бұрын
Is the algorithm used to walk down the tree a DFS?
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Not sure it is precisely DFS but React definitely goes through the tree in a DFS manner
@yalgaar07
@yalgaar07 2 жыл бұрын
Nice informative video
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thank you!
@user-fy5bl3kr6j
@user-fy5bl3kr6j 2 жыл бұрын
thanks for sharing
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Thanks for watching!
@eegaramesh3093
@eegaramesh3093 3 жыл бұрын
Great explanation, but need analogy with virtual dom.
@PhilipFabianek
@PhilipFabianek 3 жыл бұрын
Thank you!
@timjobs9072
@timjobs9072 2 жыл бұрын
wow, it's really good explanations in the video, but I still got so many confusions in learning React fiber because this is my first time to learn it. My dear video author, can you tell me there is some other good resources to learn about it?
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
blog.logrocket.com/deep-dive-react-fiber/ indepth.dev/posts/1008/inside-fiber-in-depth-overview-of-the-new-reconciliation-algorithm-in-react
@timjobs9072
@timjobs9072 2 жыл бұрын
@@PhilipFabianek Oh, thank you, I really appreciate it
@dan-kn3dm
@dan-kn3dm 2 ай бұрын
Use 1.25 speed, thank me later. Btw nice video!
@yannislee5469
@yannislee5469 10 ай бұрын
nice!
@PhilipFabianek
@PhilipFabianek 10 ай бұрын
Thank you!
@TajAlasfiyaa
@TajAlasfiyaa 2 жыл бұрын
I started programing on this year Feb 2022 and I not have CS degree ,do you any Suggestion for me . I learn html , css , js , react . know I am reading react docs . I want to get deep in react. Is this right for me now ? Thank you for your videos
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
If you want to work as a frontend developer, those technologies are definitely right for you. It is also important to not just learn, but to also work on a lot of projects.
@TajAlasfiyaa
@TajAlasfiyaa 2 жыл бұрын
@@PhilipFabianek thank you
@karthiksuryadevara2546
@karthiksuryadevara2546 11 ай бұрын
Is fiber tree == virtual Dom?
@PhilipFabianek
@PhilipFabianek 11 ай бұрын
No, they are not
@karthiksuryadevara2546
@karthiksuryadevara2546 11 ай бұрын
@@PhilipFabianek so the changes made to the fiber tree based on user events and state updates are then applied to virtual DOM and the diffing algorithm is run and DOM is updated and then the screen renders. Please correct me if iam thinking wrong
@user-hb3gb9zn7n
@user-hb3gb9zn7n 29 күн бұрын
In summary, the virtual DOM tree is a JavaScript representation of the HTML structure used by React for efficient diffing and patching operations. The fiber tree, on the other hand, is a more complex data structure that organizes components and their virtual DOM nodes, allowing React to efficiently schedule and perform updates based on their priority. Together, they enable React to efficiently update the actual DOM while minimizing unnecessary operations.
@VKY-XLR8
@VKY-XLR8 Жыл бұрын
React fiber tree IS virtual DOM?
@PhilipFabianek
@PhilipFabianek Жыл бұрын
No, they are two different trees
@VKY-XLR8
@VKY-XLR8 Жыл бұрын
@@PhilipFabianek love the way that u reply to questions, highly appreciated. May I ask where can I find the answers to the question..
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Well I actually talked about both of the trees in my videos. About the first one (virtual DOM tree) in React.js Deep Dive #1 and about the second one (Fiber tree) in React.js Deep Dive #2
@VKY-XLR8
@VKY-XLR8 Жыл бұрын
@@PhilipFabianek will check them, thank you :)
@user-hb3gb9zn7n
@user-hb3gb9zn7n 29 күн бұрын
@@VKY-XLR8 In summary, the virtual DOM tree is a JavaScript representation of the HTML structure used by React for efficient diffing and patching operations. The fiber tree, on the other hand, is a more complex data structure that organizes components and their virtual DOM nodes, allowing React to efficiently schedule and perform updates based on their priority. Together, they enable React to efficiently update the actual DOM while minimizing unnecessary operations.
@momo-we4yc
@momo-we4yc Жыл бұрын
thanks
How Do React Hooks Actually Work? React.js Deep Dive #3
14:15
Philip Fabianek
Рет қаралды 27 М.
React Fiber Reconciliation: How it Works (Part 1)
13:43
Tejas Kumar
Рет қаралды 8 М.
I PEELED OFF THE CARDBOARD WATERMELON!#asmr
00:56
HAYATAKU はやたく
Рет қаралды 38 МЛН
Joven bailarín noquea a ladrón de un golpe #nmas #shorts
00:17
格斗裁判暴力执法!#fighting #shorts
00:15
武林之巅
Рет қаралды 74 МЛН
How Does React Actually Work? React.js Deep Dive #1
15:25
Philip Fabianek
Рет қаралды 132 М.
=nil; Tech Talk: Sharded Apps Architecture
45:04
=nil; Foundation
Рет қаралды 113
How React ACTUALLY works (DEEP DIVE 2023)
12:59
FrontStart
Рет қаралды 47 М.
Understanding React's UI Rendering Process
29:07
CrossComm, Inc.
Рет қаралды 204 М.
Async JavaScript & Callback Functions -- Tutorial for Beginners
24:21
8 React Js performance optimization techniques YOU HAVE TO KNOW!
11:23
Goodbye, useEffect - David Khourshid
29:59
BeJS
Рет қаралды 493 М.
React tutorial in Hindi #46 Hight order component (HOC)
10:31
Code Step By Step
Рет қаралды 91 М.
Samsung Android Mobile Battrey
0:39
Gaming zone
Рет қаралды 342 М.
👎Главный МИНУС планшета Apple🍏
0:29
Demin's Lounge
Рет қаралды 439 М.
Introducing GPT-4o
26:13
OpenAI
Рет қаралды 4,4 МЛН