Forked from cartant/medium-rxjs-ref-count-teardown-ref-count.ts
Last active
July 20, 2019 22:50
-
-
Save LayZeeDK/334e249e1195579d27a1647f21bc9e7b to your computer and use it in GitHub Desktop.
RxJS ≥6 version
This file contains 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.pipe(take(1)).subscribe(observer("a")); | |
const b = counted.pipe(take(1)).subscribe(observer("b")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment