Тёмный

React reconciliation: how it works and why should we care 

Developer Way
Подписаться 11 тыс.
Просмотров 12 тыс.
50% 1

Опубликовано:

 

26 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 81   
@leonardodeslf
@leonardodeslf Год назад
Please, never ever stop doing this! It's clear and explained in such a way that's easy and enjoyable to learn. Keep it up and thank you for sharing! 🤗🤗
@developerwaypatterns
@developerwaypatterns Год назад
Thank you! 😊
@Alastairtheduke1
@Alastairtheduke1 Год назад
I agree, you have an amazing gift for teaching!
@Antoshkiv1
@Antoshkiv1 8 месяцев назад
​@@developerwaypatterns I just woundering how did you get all this thing ? I just was googling for it and found your blog and videos but how did you learn it ?
@ostadomid3355
@ostadomid3355 5 дней назад
Haven't seen such easy explained detailed video ever. Really helpful. Hope to have more like this.
@СергейМаркелов-м7м
@СергейМаркелов-м7м 9 месяцев назад
What a crazy fact with same key and conditional rendering with null! Bravo 👏 Thank you for explaining these things
@mikitaishchanka4688
@mikitaishchanka4688 Год назад
Yeah! Your rock! There are tonnes of content for novices on RU-vid or the Internet and almost no content with advanced, "diving deep", "under the hood" stuff topics. And you provide clear explanation, code samples with code sandbox so we can play with it. There is no way we can't understand the topic. Thank you!
@ayushkumar2436
@ayushkumar2436 2 дня назад
super helpful finaly have a better understanding of react reconcilliation
@ibrahimmohamed856
@ibrahimmohamed856 Год назад
Thanks for the information it clears a lot of confusing concepts in react that may make juniors struggle ❤
@developerwaypatterns
@developerwaypatterns Год назад
Glad it was useful! 😊
@Yoband706
@Yoband706 Год назад
And non-juniors to be honest. Loved this video.
@sebabratakundu
@sebabratakundu Год назад
I learned a lot from your posts and videos. Keep sharing your knowladge with us.
@Arzen84
@Arzen84 Год назад
I love your articles and I very much appreciate you taking the time to make a video of some of your articles! The way you break down the concept is brilliant! Once again, thank you so much!
@developerwaypatterns
@developerwaypatterns Год назад
Thank you, glad those are useful! 😊
@marketkombat
@marketkombat Год назад
Thanks, your videos are always a pleasure to watch because I love under the hood stuffs and your delivery is very engaging.
@cypherstone3005
@cypherstone3005 10 месяцев назад
You're amazing dude. Awesome explanation.
@warwolt
@warwolt 11 месяцев назад
Incredible explanation
@gyros9162
@gyros9162 Год назад
Thank you so much, Nadezhda! The article is brilliant
@ezeobisunny
@ezeobisunny Год назад
I love your explanation, very clear and concise ❤
@marcellciszekdruzynski
@marcellciszekdruzynski 9 месяцев назад
Your videos and blog posts are just amazing keep up with the awesome job!
@ngrnv
@ngrnv 8 месяцев назад
Amazing! That is the content I was looking for!
@MS-el8wj
@MS-el8wj Год назад
One of the best explanation for reconciliation. I loved it. Thanks for your time
@lovikuanyshev
@lovikuanyshev 9 месяцев назад
Really love your videos, thanks for the great work!
@SouravRakshit_srv
@SouravRakshit_srv Год назад
I couldn't understand this topic from react docs thank you so much
@moisesarias4563
@moisesarias4563 7 месяцев назад
Muchas gracias por el contenido, que forma tan sencilla de explicar conceptos más avanzados
@aissanadjemeddine1330
@aissanadjemeddine1330 6 месяцев назад
Thank you so much for this videos 💓💓💓
@hossamkamal2459
@hossamkamal2459 5 месяцев назад
That was clear and concise, thank you. Please, could you create those types of videos covering JavaScript object-oriented programming design patterns as well?
@RiadAlsaqal
@RiadAlsaqal Год назад
gold content. thank you.
@itsmepawan
@itsmepawan Год назад
I am newbie to React so didnt't understand it completely as this seems advanced but I still got one aha moment. Subbed! 🙌
@silvioc9519
@silvioc9519 Год назад
i love so much your work. Thanks :D
@HoangHahalehoang
@HoangHahalehoang Год назад
great job Nadia!
@pritamchakroborty9924
@pritamchakroborty9924 10 месяцев назад
Really very helpful video. lots of knowledge thanks for sharing with us ❤
@shrekpar
@shrekpar Год назад
Большое спасибо за видео, очень интересно и познавательно. У вас хорошо получается доносить материал. И еще раз большое спасибо)
@developerwaypatterns
@developerwaypatterns Год назад
Glad you like it 😊
@mohdsaquib380
@mohdsaquib380 7 месяцев назад
Your tutorials and articles are amazing and of deep knowledge. Can you please share how and what tools you use to create RU-vid videos? Really your explanations are too the point and simple.
@developerwaypatterns
@developerwaypatterns 7 месяцев назад
Thank you! :) I use Final Cut Pro and sometimes Keynote
@innerstateofflow7777
@innerstateofflow7777 10 месяцев назад
this is god-tier
@LinhNguyen-bp9hd
@LinhNguyen-bp9hd Год назад
I'm impressed with React re-renders guide: everything, all at once that's why I came here, thanks for the content is it your real voice or machine?
@LinhNguyen-bp9hd
@LinhNguyen-bp9hd Год назад
would appreciate if you can recommend any good book on react kind of a deep dive like what you are doing
@developerwaypatterns
@developerwaypatterns Год назад
I'm about to release a book about exactly that in a few days, subscribe here: advanced-react.com/ :) The voice is real :)
@katsunoi
@katsunoi 10 месяцев назад
amazing video! you have a great teaching style
@victorpilyasinsky8736
@victorpilyasinsky8736 Год назад
Надя, спасибо, познавательно!
@JoeBuza
@JoeBuza Год назад
Quality content
@MauricioCorzo-g7v
@MauricioCorzo-g7v Год назад
Great explanation! Next time you can make a video explaining the differences between manipulating the real DOM and the Virtual DOM and how is the diff algorithm?
@developerwaypatterns
@developerwaypatterns Год назад
Thank you! I'll add this to my todo list, great idea :)
@fiatluxinregnonoctis
@fiatluxinregnonoctis Год назад
Thank you
@story_of_us_
@story_of_us_ Год назад
I love your videos and blogs so much! Keep going and I will always support you! Btw, I really like your editor theme, do you mind to share with me? Thank you and happy coding!
@developerwaypatterns
@developerwaypatterns Год назад
Aww, thank you! 😊 It's not my editor, it's "Material" theme from carbon.now.sh/ 😅 But maybe can be installed in VSCode, don't know tbh
@sasdasaasdasdasdadad5354
@sasdasaasdasdasdadad5354 Год назад
Thanks !
@jordantseng8330
@jordantseng8330 Год назад
god tier!
@TheTrippyTerminal
@TheTrippyTerminal 7 месяцев назад
Thats it, friendship broken with React.
@lovikuanyshev
@lovikuanyshev 8 месяцев назад
I came back to this video to clarify my understanding of React Reconciliation Algorithm and I have a question related to "Components inside other components" part of this video: Firstly, React will shallowly compare both React Elements by reference, since we have created a new React Component inside our current Component it will be recreated every re-render and the returning Element will be also always different, so this comparison will always return false. Also after watching your video "Elements, Children and Re-renders - Advanced React course, Episode 2" I found out that React won't trigger re-render if children React Elements are the same by reference and the only way to implement this is to use React Elements as props. React will compare them and will find out that they are the same and won't trigger re-render. My question is: If we will create React Component outside of the current Component it will save reference for the Component Function, but the returning Element will be always different and React Reconciliation will fail first shallow comparing, right? So whats the difference if we will declare React Component inside or outside of the current Component because anyway the returning React Element will have always different reference? Is it all about saving reference for the React Component Function? Thank you!
@developerwaypatterns
@developerwaypatterns 8 месяцев назад
> Is it all about saving reference for the React Component Function? This is exactly right :) If the Element changes (as will happen in both cases), but the "type" property is the same (as will happen with the reference to it, if it's declared outside) - then the component, that is represented by that Element, will just re-render. If the "type" changes as well - as will happen if the component is declared inside, then the component will re-mount. I.e. it will be destroyed and re-created from scratch.
@lovikuanyshev
@lovikuanyshev 8 месяцев назад
@@developerwaypatterns Thank you ;)
@markedby
@markedby Год назад
Thank you!
@berkaycirak
@berkaycirak 6 месяцев назад
Thank you so much, I think I have found a gem :) . Could you give more information about reactDom library vs react itself. As I know, reconcilation is done thanks to reactDom while diffing algorithm is handled by react library itself. When we do reactDom.render() all logic is started and reconcilation is started. Then, react element tree is created thanks to react library ( since there is a react.createElement ). What actually reactDom is doing? it just syncing real dom with virtual dom am I right? If so, reconcilation is handled by react library itself since it creates element trees? I am confused of that part
@arjungaikwad9602
@arjungaikwad9602 11 месяцев назад
Hi Nadia, Thanks for such a beautiful explanation. I have a doubt regarding the calling the component function outside. Can't we just use a useCallback hook to store the same reference of the component?
@developerwaypatterns
@developerwaypatterns 11 месяцев назад
If it doesn't depend on the state, then we indeed can, but what for? Much easier to move it outside. If it does depend on the state, then it will re-mount every time the state changes.
@4BeerLife
@4BeerLife Год назад
thx!
@marouaniAymen
@marouaniAymen Год назад
Thanks a lot for the video, as always instructing content. Just a question, what tool did you use to animate and display code examples ?
@developerwaypatterns
@developerwaypatterns Год назад
Thank you! For animation - it's just Keynote :)
@sharifurrobin7720
@sharifurrobin7720 4 месяца назад
Amazing explanation ❤
@roym4457
@roym4457 Год назад
thank you so much for the video! i was just starting to study the source code of react and this helps a ton. i do have a question tho. is the diffing alg a part of fiber architecture?
@developerwaypatterns
@developerwaypatterns Год назад
It's implemented and used in fiber architecture, yep, but it existed before it. And not necessarily tied to it, other frameworks can use it as well.
@roym4457
@roym4457 Год назад
@@developerwaypatterns gotcha thank you :)
@sushantrajbanshi4508
@sushantrajbanshi4508 Год назад
Could you also explain another fancy word on React called "referential equality" ? Is it related to reconciliation ?
@developerwaypatterns
@developerwaypatterns Год назад
No, it's how javascript compares functions, objects and arrays (non-primitive values). It's happening not by their actual value, but by the reference to a value. So two identical arrays/functions/objects, when compared, will return false: ``` const a = [1,2]; const b = [1,2]; a === b; // will be false ``` Only if those variables are pointing to the same object, the comparison will be true: ``` const a = [1,2]; const b = a; a === b; // will be true ``` developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness
@sushantrajbanshi4508
@sushantrajbanshi4508 Год назад
@@developerwaypatterns Hmm, so the non-primitive values are passed by reference instead of a new copy of them. It finally clicks now :D I can't thank you enough 💚
@shanemarchan658
@shanemarchan658 Год назад
Hey, how do you create the animations?
@developerwaypatterns
@developerwaypatterns Год назад
I use Keynote on Mac
@arbnorlumezi8639
@arbnorlumezi8639 Год назад
Hmm if the inputs are stateful, say by a useState hook for each this behavior does not happen, good but why?
@developerwaypatterns
@developerwaypatterns Год назад
Can you share the code? Is state controlled by the inputs or by the parent?
@arbnorlumezi8639
@arbnorlumezi8639 Год назад
@@developerwaypatterns the state is controlled by the parent, same code just add 2 hooks for each input.
@developerwaypatterns
@developerwaypatterns Год назад
If the state is controlled by the parent, then those input don't hold their own state. And for bug to be visible, inputs should have something that they control independent of the parent
@GurovDmitriy
@GurovDmitriy 3 месяца назад
components cannot be created inside components... unless it's a memo))))
@berbudy
@berbudy Год назад
Wow just yesterday I try to understand fiber tree data structure by asking chatgpt and today I found this video that explain it clearly better than chatgpt, thank you for creating this video 🫡
@this-user-is-not-loser
@this-user-is-not-loser Месяц назад
Cool! Thanks!
@sachinmalik5837
@sachinmalik5837 11 месяцев назад
Hi Nadia, Awesome stuff like how updates happens under the hood. But I have one question, regarding the example that you have used here, (link of CodeSandbox), the state(input of tax) will only persists, because we are not using controlled input right? if we were to provide value prop for Input which we more likely are then this will not happen right? I do understand the point of this example is for you to explain how DOM nodes are compared, Still wanted to know more about this. Cheers
@developerwaypatterns
@developerwaypatterns 11 месяцев назад
Yep, exactly! Controlled state will belong to the parent, so there will be no weird side-effects like that. It's just input is the easiest way to create a meaningful example of a component with local state :) But the same situation will be with anything that holds its own state that is not synced with the parent
@sachinmalik5837
@sachinmalik5837 11 месяцев назад
@@developerwaypatterns Great Thank you for getting back to me. And I am so glad I found your article/blogs they are just nuggets of gold. Cheers
Далее
Fantastic closures and how to find them in React
19:04
React Fiber Reconciliation: How it Works (Part 1)
13:43
Ivanna Kacevica: Cleaner Flutter code with Dart 3 🧼
18:41
Preventing re-renders with React.memo
11:39
Просмотров 6 тыс.
Understanding React's UI Rendering Process
29:07
Просмотров 215 тыс.
Why React components re-render?
13:30
Просмотров 13 тыс.
Every React Concept Explained in 12 Minutes
11:53
Просмотров 659 тыс.
Preventing React re-renders with composition
12:11
Просмотров 20 тыс.