RxJS: Don’t Unsubscribe

RxJS: Don’t Unsubscribe

Well… okay, just don’t unsubscribe quite so much.

I’m often enlisted to help someone debug an issue with their RxJS code or figure out how to structure an app that is composing a lot of async with RxJS. When doing so, I generally see the same thing pop up over and over again, people keeping handles to tons and tons of subscription objects. Developers will invariably make 3 HTTP requests with an Observable, and then keep 3 subscription objects that they’re going to call when some event occurs.

[…]