Embed presentation
Download to read offline

![Mounting: When a component is initialized
- constructor
- getDefaultProps
- getInitialState
- componentWillMount()
- render
- componentDidMount()
Updating: When a component has state changed [Change
Detection]
- shouldComponentUpdate() [identifies the changes] – value
before change - old value
- componentWillUpdate()
- render
- componentDidUpdate() – value after change - new value
Unmounting: When a component is unmounting [Cleaning Up /
Destroying]
- destruct the objects
- destroy the memory allocated for object
- componentWillunmount()](https://image.slidesharecdn.com/componentlifecycleinreact-220617142316-443d3499/85/Component-Life-Cycle-in-React-docx-2-320.jpg)

Component Life Cycle describes the different phases a React component goes through from initialization to destruction, including mounting, updating, and unmounting. Mounting occurs when a component is initialized and involves methods like constructor, render, and componentDidMount. Updating happens when a component's state changes and involves shouldComponentUpdate, componentWillUpdate, render, and componentDidUpdate. Unmounting is when a component is destroyed and cleans up resources using componentWillUnmount.

![Mounting: When a component is initialized
- constructor
- getDefaultProps
- getInitialState
- componentWillMount()
- render
- componentDidMount()
Updating: When a component has state changed [Change
Detection]
- shouldComponentUpdate() [identifies the changes] – value
before change - old value
- componentWillUpdate()
- render
- componentDidUpdate() – value after change - new value
Unmounting: When a component is unmounting [Cleaning Up /
Destroying]
- destruct the objects
- destroy the memory allocated for object
- componentWillunmount()](https://image.slidesharecdn.com/componentlifecycleinreact-220617142316-443d3499/85/Component-Life-Cycle-in-React-docx-2-320.jpg)
