Tim McKenna
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

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade