liveBook · Manning

Subscription

A subscription is an object or association representing an ongoing relationship through which a consumer receives updates or data from a source and may control that relationship.

How 2 Manning books explain it

Modern Angular

An RxJS subscription is an object representing an active connection to an observable and the execution associated with receiving its notifications.

How it is used
Controls observable execution and cleanup across Angular component, routing, service, and signal-interoperability lifecycles.
How deep it goes
Defines the returned object, demonstrates unsubscribe and takeUntil, and stops short of a complete shared-connection disposal strategy.
Examples
Uses interval logging, explicit unsubscribe, destroy$ cleanup, routed query parameters, and a notification web-socket service.
What you can do after
Operate subscription lifecycles by retaining handles, applying pipeline termination, and recognizing resource leaks in signal interop.

Read how Modern Angular explains Subscription →

The Joy of JavaScript

A Subscription is an object that represents an ongoing connection to a stream or observable source for receiving values over time.

How it is used
Coordinates a subscriber’s connection to push-based streams and Observable sources.
How deep it goes
Defines subscription behavior and cleanup, with examples, but defers detailed operator and library implementations.
Examples
Uses Observable.of with console logging, explicit unsubscribe, and setInterval cleanup.
What you can do after
Operate an Observable connection by subscribing to events and invoking unsubscribe to stop delivery and perform cleanup.

Read how The Joy of JavaScript explains Subscription →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.