Search⌘ K

Using a Subscription

Explore how to use subscriptions in RxJS to manage observable data streams effectively. Understand how subscribing returns a subscription object and how to unsubscribe from events. Learn to merge multiple subscriptions and keep subscription logic centralized to maintain cleanup and control over asynchronous events.

Subscription

There’s one more vocabulary word before this chapter is over: subscription.

While piping through an operator returns an observable:

let someNewObservable$ = anObservable$.pipe(
  map(x => x * 2)
);

A call to ...