Category: Rxjs


Rxjs Observable publish refcount vs share

The two common ways to share data coming from an observable is via the publish().refCount() and share() methods. At first glance, they might seem similar but there one difference between the two techniques that...


Getting started with Rxjs and streams

When I first started learning about Rxjs observables and streams, I found it really difficult to understand the flow of data across the system. Not because its difficult, but mainly because it is simple...


Understanding the Rx multicast operator

By default, observables are unicast. i.e. each subscriber causes the observable to be invoked independently. In contrast, a multicasted observable is one that emits the same data to all the subscribers.


The difference between switchMap and flatMap or mergeMap

switchMap and mergeMap are probably going the be the most powerful and frequently used operators in your arsenal. Its is thereby critical to understand the difference between the two in order to spend less...


Difference between Rxjs Subject and Observable

In order to understand the difference between a Subject and an Observable, you need to be aware of two distinct concepts – A data producer – A data consumer An observable, by definition is...