The lack of subscription handling can cause many problems in your app, the most critical one is memory leak. Subscriptions are not bundled with the component; therefore, we also need to dispose of subscriptions when the components are being destroyed. To destroy the subscription we created we can use the method on the function we created.

8m read timeFrom blogs.halodoc.io
Post cover image
Table of contents
Understanding Observables and SubscriptionsWhy We Need to Handle SubscriptionThe Subscription LifecycleWays to Handle Subscriptions in AngularConclusionLearn More about Angular

Sort: