Monthly Archives: March 2020

Why unsubscribe in Angular?

Why do you need to unsubscribe of observables in OnDestroy hook? Observable can emit multiple values, so if you want to stop evaluating logic after destroying (closing) component you would need to call unsubscribe If component is closed and request is still pending the unneeded logic could evaluate after component is closed And sometimes it […]