Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 996 Bytes

REACT React's render cycle.md

File metadata and controls

17 lines (10 loc) · 996 Bytes

REACT

Class: FRONTEND

Notes: React's render cycle

React's render cycle consists of three main phases: Mounting, Updating, and Unmounting.

  1. Mounting: This phase occurs when a component is being created and inserted into the DOM. Key lifecycle methods include constructor, componentDidMount, and render.
  2. Updating: This phase occurs when a component's state or props change, causing it to re-render. Methods involved include shouldComponentUpdate, render, and componentDidUpdate.
  3. Unmounting: This phase happens when a component is being removed from the DOM. The primary method here is componentWillUnmount.

Each of these phases allows developers to hook into specific points in the lifecycle to perform actions like data fetching, subscriptions, or cleanup tasks. It's essential to understand these phases to manage component behavior effectively.

Always double-check the latest React documentation for updates or changes.

https://www.notion.so