It is not 100% correct to say that componentDidUpdate() is called after componentDidMount(). In the lifecycle of a Component, componentDidMount() is called in the Mounting phase. While componentDidUpdate() is called in the Updating phase.
If there is a state change in the Updating phase that will trigger componentDidUpdate().
Hi there 🖐 , I'm Ibad Shaikh , A passionate * Javascript Developer 🚀 * having an experience of 1 year of building web applications with NodeJS / ExpressJS / MongoDB / Firebase.
It is not 100% correct to say that componentDidUpdate() is called after componentDidMount(). In the lifecycle of a Component, componentDidMount() is called in the Mounting phase. While componentDidUpdate() is called in the Updating phase.
If there is a state change in the Updating phase that will trigger componentDidUpdate().
This is an important distinction.
correct
Thank you for the clarification.
Highly agree!
I now got cleared about this concept while reading your comment..
Absolutely right