In the next video, you'll learn about the lifecycle of the components in React.
As you learned in the last video, the component lifecycle in React varies from one process to another, and there are a total of three process — Mounting, Updating, and Unmounting.
Mounting refers to the instance of a component being created and inserted into DOM.
Updating denotes the instance of a component being updated by props or state.
Unmounting refers to the component being removed from DOM.
Let’s look at the mounting process inside the Phone Directory app.
Inside Mounting process, a component’s lifecycle is defined by the following methods, which are called in the given order:
constructor()
render()
componentDidMount()
In the next video, you’ll manipulate state and see its effect on a component’s lifecycle.
As witnessed in the last video, a change in state leads to the render() method being called again.
Additional Resources:
You do not need to commit anything yet. Remove all the console.log() methods inside your application. Also, remove the componentDidMount() method that you wrote just now inside the App.js file.