nshmura nshmura - 4 months ago 22
Javascript Question

Empty Subscription for RxJs

Is there an empty

Subscription
in RxJs?
In RxJava, there is Subscriptions.empty().

An empty
Subscription
is a
Subscription
to which unsubscribe does nothing except to change isUnsubscribed to true.

I am looking for it, but I can't find.

Answer

Yes such a thing exists:

RxJS 5 has Subscription.EMPTY

RxJS 4 has Disposable.empty

Comments