Nicholas Jamieson
1 min readJul 16, 2017

--

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.

--

--

Nicholas Jamieson
Nicholas Jamieson

Written by Nicholas Jamieson

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

Responses (1)