Though this equation gives us a simple mental model for how React works, there’s one aspect of the equation that still, after all these years, seems to confuse people. Exactly when and how is invoked? Or said differently, exactly when and how does React update the view?
Many blog posts, conference talks, and tweet threads have been dedicated to this seemingly simple topic. And yet, for some reason, it’s still a topic that even experienced React developers have some (often unknown) misconceptions about.
https://ui.dev/why-react-renders