There are three different phases of React component’s lifecycle:
1) Initial Rendering Phase: This is the phase when the component is about to start its life journey and make its way to the DOM.
2) Updating Phase: Once the component gets added to the DOM, it can potentially update and re-render only when a prop or state change occurs. That happens only in this phase.
3) Unmounting Phase: This is the final phase of a component’s life cycle in which the component is destroyed and removed from the DOM.
Comments
Post a Comment