React JS Life cycle
The life-cycle events of a React component can be grouped into three phases: 1.Mounting: This is the phase where the component is added to the DOM and initialized. The following life-cycle methods are called during this phase: 2. Updating: This is the phase where the component is updated due to changes in props or state. The following …