Jul 22, 2017 · 1 min read
Great story, I just needed to stop the console for the last example to be able to see what happened.
let sub3
setTimeout(() => {
// reusing the hot observable
console.log(‘reusing hot observable…’);
sub3 = hot.subscribe((e) => console.log(‘s3’, e));
}, 4500);// unsubscribe to the reused hot observable
setTimeout(() => {
sub3.unsubscribe();
}, 6000);
http://jsbin.com/nonoqucuqi/edit?js,console
