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…

--

--

--

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

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Building a Parallax Header in React

Adventures in TypeScript

Best Build Platforms for React Native Apps in 2021

Best Build Platforms for React Native Apps in 2021 CI/CD

JavaScript 10 Basic Useful Hacks

Building a simple chat app with Vue.js

Trying Deno

5 React Hooks that you will use in your everyday life as a developer

My first React puzzle journey

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
Nicholas Jamieson

Nicholas Jamieson

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

More from Medium

What are Modules in Angular?

Rx.js Observables

Advice Generator App(Frontend Mentor)

Angular vs React vs Vue : Which to choose for your career as a UI developer