React LifeCycle method

ccomponentWillUnmount :

This method is invoked immediately before a component is destroyed and unmounted permanently.
It performs any necessary cleanup related task such as invalidating timers, event listener, canceling network requests, or cleaning up DOM elements.
If a component instance is unmounted, you cannot mount it again.