But really, with this memoization, our code gets cluttered up with extra logic. We're not just focusing on the core product experience, we're focusing on, again, how to achieve it. It makes our code harder to read and harder to change. So, in a sense, useMemo is a compromise.
We sacrifice some of the clean, concise, original logic in exchange for better performance. But why do we need to make this compromise at all? Well, let's go back to the code. The reason we started down this whole path was that we needed to use useMemo to tell React that the video list doesn't depend upon heading. But we're all developers, we know JavaScript, right? We've already told React that video list doesn't depend upon the heading. In fact, we've used a very well-specified format of instructions that computers already understand to tell React that information. It's called JavaScript. You already know it, right? So why do we have to tell React again? Why do we have to also add in our use memo to tell React, oh, this doesn't depend upon these values? What if React could figure that out automatically? And better yet, what if React could figure this out at build time when you compile your app? And didn't you?
...design decisions, but might need to make further adjustments and optimizations, depending on data. Our next step is to scale up until forget is used everywhere at meta, refining on small details. Finally, when we have stress tested and iterated enough, we release. While we still have some work ahead of us, we strongly believe that forget will help React achieve its vision, an ergonomic developer experience, paired with great performance. Thank you.
We're going to jump right into the audience questions. So hope you're ready. First question with the most upvotes is does this completely remove the need for use memo, memo and use callback? Yeah, so long term, the idea is that we would like to remove those APIs completely. Obviously, long road to get there. But that's the goal, yeah. Great. That's nice. It's one, in my experience, one of the harder concepts to grasp. But yeah, something that you need to grasp if you're building a big application. So super nice. How does React... Why is it called React Forget and not React Remember? The previous question was really good. I was excited about that. I wanted to answer that. Okay, well I know what it was.
Comments