So we just run, there's a lot of effects running, really, a lot of effects being committed. But at some point what you'll see is we switch the trees from the current to the work in progress. And we also call a hook. When it's finished, what happens? Eventually, we mark the commit as stopped, and it finishes where all the last things finish. So what I want to show you with this is, one, how it works with the loop, but also that there's a lot of edge cases, there's a lot of stuff that React solves for you that you don't need to solve yourself, and that's the whole value proposition, how do we make updates to the UI in a fast way, in a predictable way, and in a way that allows us to just build apps fast, without concerning ourselves too much with the internals.
That cool? All right. Let's talk about my takeaway. What can we take away from this talk? We can take away that React internals are complex, but the externals are powerful because of that. Like, we can build all of those edge cases, those massive switch cases you saw, our work that the team does on our behalf, so that we don't have to, so that React can have a really good environment to build apps powerfully and fast.
That said, the internals are fun. And my one takeaway for you is to remember, hey, listen, React, I've heard a lot of people say that React is too hard or too complex, like the internals. All of this talk I prepared was by reading the source code on GitHub because it's open source and trying to participate, and actually, now I'm participating, I guess, I did talk to some of the team who are very welcoming and supportive, and it's an ecosystem. So my takeaway is, I'm thankful to be a part of this ecosystem and I hope you will be encouraged to do so as well. React Advanced London, thank you so much for the time. Thank you, thank you, thank you. Please do leave your laptop and follow me to the interrogation chamber. Uh-oh. Yes. I'm about to be interrogated. You're in trouble, young man. No, thank you, that was a deep dive. You are truly living up to your promises and the name of this conference. Am I a fish? Are you a fish? Do you want to be a fish? Is being a fish a good thing? There's a superhero in this show called The Boys who's a fish. The deep, anyway. Yeah, I, Aquaman is underrated is my take. That's my take. Should we talk more about that? No, okay. Let's go to audience questions. The first audience question is, in what ways have you found that a deeper understanding of React under the hood has informed or changed the code you write? I like this a lot. I like this a lot. So in small ways. And I cannot emphasize enough how important it is to not concern ourselves too much with the internals. There's people paid well to do that for us, right? And so they do it well for us so that we don't have to, and the focus is using React. And that's the focus. Not necessarily understanding the internals. But understanding the internals has helped me in cases of like pull request reviews where we have debates or something, we can actually like look at the code and I can teach and mentor. I think it helps. But also, I stay away from micro-optimizations because I know what's happening. Like, I don't need to put everything in used memo. I don't need to make all my components lazy. Like, it helps inform how much do I optimize because I know how much is being optimized for me behind the scenes, so. For sure. I want to add my own question to that. I remember when we used to work with simpler tools that weren't as powerful, but also were simpler. At one point, I think I remembered most of the backbone source code by heart. Now with these tools that we use right now, the complexity is too much for a working product programmer to kind of look at. So, how much do you think is important as you become, let's say, more senior in organization to have a person on a team who understands these tools? Or is that just a completely waste of time? I don't know if it's a waste of time, because I think a big important part of being a senior engineer is the ability to mentor. There's a soft skills room, right? I really want to attend that because I feel like that's actually more important than the code itself sometimes. And so I think if there's at least one person who has a real depth of knowledge there, they can use it to educate and inform. And there's a lot of patterns in this code base that I can learn from personally.
Comments