Forked from cartant/medium-rxjs-ref-count-resubscribe-no-complete.ts
Last active
July 20, 2019 22:54
-
-
Save LayZeeDK/0a13bbe52b5a66b1f20bebb6a1328c83 to your computer and use it in GitHub Desktop.
RxJS ≥6 version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const source = instrument(interval(100)); | |
const counted = source.pipe(publish(), refCount()); | |
const a = counted.subscribe(observer("a")); | |
setTimeout(() => a.unsubscribe(), 110); | |
setTimeout(() => counted.subscribe(observer("b")), 120); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment