Every component in React goes through a lifecycle of events. You can think is of going through a cycle of birth, growth, and death the same as the picture below. The phases are: Starting the journey of your component Initialization — Birth of your component Mounting — — Growth of your component Update — Death of your component Unmount 1. Initialization This is the phase in which the component is going to start its journey. The developer has to define the props and initial state of the component. This is usually done inside the constructor method. 2. Mounting Mounting is the phase of the component lifecycle when the initialization of the component is completed and the React component mounts on the DOM (i.e., is created and inserted into the DOM) and rendered for the first time on the webpage. It has 2 predefined functions:- : As the name clearly suggests, This method is invoked just before a component mounts on the DOM, i.e. this function gets invoked once before the () function is executed for the first time. After this method, the component gets mounted. componentWillMount() render : Similarly to the previous one this method is called after the component gets mounted on the DOM and only once in a lifecycle. Before the execution of this method, the method is called (i.e., we can access the DOM). We can make and with the API response. componentDidMount() render API calls update the state 3. Updating Updation is the phase where the states and props of a component are updated followed by some user events such as clicking, pressing a key on a keyboard etc. This is where a component’s state changes and hence, re-rendering takes place. The methods that are available in this phase are: : It is invoked as soon as the props are updated before another render is called. Basically, it is invoked before a mounted component receives new props. If you need to update the state in response to prop changes (for example, to reset it), you may compare this.props and nextProps and perform state transitions using this.setState() in this method. componentWillRecieveProps() Function This will determine if the component will be updated or not. The Function fulfills the requirement by letting React know whether the component’s output will be affected by every state or props update or not. It is invoked before rendering an already mounted component when new props or states are being received. If returned false then the subsequent steps of rendering will not be carried out. This method is not called for the or when is used. The Function takes the new Props and new State as the arguments and returns whether to re-render or not by returning a or value. By default, it is set to true. This method only exists as a shouldComponentUpdate: initial render forceUpdate() true false performance optimization . is called just before rendering i.e. the function gets invoked once before the render() function is executed after the updation of State or Props. componentWillUpdate: is called just after rendering.This is also a good place to do network requests as long as you compare the current props to previous props (e.g. a network request may not be necessary if the props have not changed). will not be invoked if returns false. componentDidUpdate: componentDidUpdate() shouldComponentUpdate() 4. Unmounting This is the final phase of the lifecycle of the component that is the phase of unmounting the component from the DOM. The following function is the sole member of this phase. This function is invoked before the component is finally unmounted and destroyed from the DOM. componentWillUnmount(): You in componentWillUnmount() because the component will never be re-rendered. Once a component instance is unmounted, it will never be mounted again. should not call setState() Perform any necessary cleanup in this method, such as invalidating timers, canceling network requests, or cleaning up any subscriptions that were created in componentDidMount() Thanks for reading. Happy React coding!… Also published behind a paywall at: https://medium.com/weekly-webtips/reactjs-component-life-cycle-a9dcacd97cef