Advanced React

RMAG news

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

Nadia Makarevich – Advanced React Chapter 1 “Intro to re-renders”

state updates

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.

Please follow and like us:
Pin Share