Maxim, thanks for the feedback. I appreciate it. I do intend to write more about rxjs-spy and envisage a few more posts that deal with specific debugging problems. I’ll make a few edits to this to better reflect that intention.

Regarding your question about the subscription count, rxjs-spy intercepts calls to subscribe on observable instances. Each call will be counted as a subscription for that instance, so there can be multiple subscribers. (The count will be decremented when the subscriber is unsubscribed.) Exactly what a subscription entails depends upon whether the observable instance is hold or cold. Ben Lesh has written some excellent posts on hot vs. cold observables and on subjects. If you’ve not read them, you might want to check them out.

RxJS core team member; front-end developer; mentor; speaker; open-source contributor

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store