which phase updates and re render component only when a change occurs in the state pr prop once the component will gwt added to the dom code example
Example 1: component did mmount
componentDidMount()
Example 2: component did mmount
componentDidUpdate(prevProps, prevState, snapshot)