Advanced React #1

mashcuy_lab

Mashcuy Lab

Posted on August 9, 2024

Advanced React #1

In this article we are summarizing the most interesting parts of:

  • Nadia Makarevich - Advanced React Chapter 1 "Intro to re-renders"

Lifecycle of a component

  • mounting: component is created for the first time
  • unmounting: react removes the component when is no needed
  • re-rendering: updates the component with new information

Myth: components re-render when it's props change

  • when a change over a state happens, react will re-render all the components hierarchy, props doesn't matter
  • react will check props only if we use useMemo it props change it will re-render, not otherwise.
💖 💪 🙅 🚩
mashcuy_lab
Mashcuy Lab

Posted on August 9, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related