That’s a great debugging tool.
Maxim Koretskyi
1

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.

Show your support

Clapping shows how much you appreciated Nicholas Jamieson’s story.