Unsubscribing From Firefly Semantics Slice Object Store Observables in Angular


We access our CSV data via a Slice Object Store observable like this:


We want to automatically unsubscribe when the component is destroyed.


Use the library @ngneat/until-destroy:

npm i @ngneat/until-destroy

Decorate the component with @UntilDestroy() :


And pipe through untilDestroy :


The Subscription instance will now be automatically unsubscribed.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ole Ersoy

Ole Ersoy

Founder of Firefly Semantics Corporation