What are the different phases of the component lifecycle?

The three phases are: Mounting, Updating, and Unmounting.

  • Mounting means putting elements into the DOM.

  • Updating A component is updated whenever there is a change in the component's state or props.

  • Unmounting is when a component is removed from the DOM.