REACT COMPONENT LIFECYCLE :
A component goes through, allowing code to run at specific moments during its existence.
- Covers phases like creation, update, and removal of a component.
- Helps manage side effects & resources efficiently.
- Improves application performance through controlled execution.
PHASES OF LIFECYCLE IN COMPONENT :
- MOUNTING.
- UPDATING.
- UN-MOUNTING.
MOUNTING :
The process of creating and inserting a component into the DOM for the first time in a React application. During mounting, React initializes the component, sets up its internal state, and inserts it into the DOM.
UPDATING :
The phase where a component re-renders in response to changes in its state or props, ensuring the UI reflects the latest data.
UN-MOUNTING :
The final phase of the lifecycle of the component, which is the phase of unmounting the component from the DOM.


Top comments (0)