Created
February 19, 2020 15:14
-
-
Save ArtemRomanovsky/7860b5909ec5e4d61ddc268dc89bf048 to your computer and use it in GitHub Desktop.
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 connectableObservable = Rx.Observable | |
.interval(1000) | |
.take(5) | |
.multicast(new Rx.Subject()); | |
const observerA = {...}; | |
const observerB = {...}; | |
connectableObservable.connect(); | |
connectableObservable.subscribe(observerA); // first execution | |
setTimeout(() => { | |
connectableObservable.subscribe(observerB); // the same execution | |
}, 2000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment