× logo Home HTML CSS Javascript React-App Angular.js logo
logo

React Lifecycle Events

Let's find out the React Lifecycle events and how you can use them

During the lifetime of a component, there's a series of events that gets called, and to each event you can hook and provide custom functionality.

What hook is best for what functionality is something we're going to see here.

First, there are 3 phases in a React component lifecycle:

-Mounting
-Updating
-Unmounting

Every React Component has a lifecycle of its own, lifecycle of a component can be defined as the series of methods that are invoked in different stages of the component's existence. ((Existence is the state of being alive or being real))
The definition is pretty straightforward but what do we mean by different stages?

logo

The following image is the visual representation of the phases and the methods of ReactJs lifecycle.

logo

logo

logo