RxJS: How to Use refCount

Photo by Mike Wilson on Unsplash

My previous article — Understanding the publish and share Operators — looked only briefly at the refCount method. Let’s look at it more closely here.

What does refCount do?

To recap, the basic mental model for multicasting in RxJS involves: a source observable; a subject subscribed to the source; and multiple observers subscribed to the subject. The multicast operator…

--

--

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