This example serves as a complement to other examples which talk about how to use the lifecycle methods and when the method will be called.
This example summarize Which methods (componentWillMount, componentWillReceiveProps, etc) will be called and in which sequence will be different for a component in different states:
When a component is initialized:
When a component has state changed:
When a component has props changed:
When a component is unmounting: