which react life cycle method will be execute if we are going to another page from the currect page in react js code example
Example 1: component did mmount
componentDidMount()
Example 2: component did mmount
componentDidUpdate(prevProps, prevState, snapshot)