What\'s the practical difference between observable.publish().refCount()
and observable.share()
. What would be an example of an scenario in which we do
According to article "Rxjs Observable publish refcount vs share";
With observable.publish().refCount(), once the observer completes, it will not restart if a new subscriber is added after completion. Whereas with observable.share(), if the underlying observer completes and a new subscriber is added later, the observer effectively begins a new execution and starts emitting data.