You can visit following links for more information: https://reactjs.org/docs/react-component.html https://reactjs.org/docs/state-and-lifecycle.html