Expect to come across this popular question in React interview questions for experienced.   When a React App loads for the first time, the code is run in the mentioned order. All the below-mentioned methods run only one time except “render()”, which can be run many times depending on setState and Parent component be called. 1) The “constructor()” is the first thing to be called. You can set the initial state here like below.  constructor(){
super();
this.state = {
spinLogo: true
};
} 2) Then the “componentWillMount()” will be called. It is very similar to the constructor and called only once before the initial mounting of DOM. That is the reason, it doesn’t have access to the DOM.  React documentation recommends us to use constructor instead of this lifecycle method and it will be soon deprecated.  3) Then the initial “render()” will be called. It will also render all the child components(if any) of this component. Also, note that render is generally called many times. Whenever we use setState, the component render is called. 4) Then the function “componentDidMount()” will be called. This function will also be called once during the whole life-cycle. It is a great place to do AJAX call to the server to fetch some data. You can also initialize something that requires interaction with the DOM, like a jQuery library.