Closed justinwoo closed 8 years ago
There's long discussions in https://github.com/ReactiveX/RxJS/issues/453, shorthanded summary's at https://github.com/ReactiveX/RxJS/issues/1110 also.
In short, for now shareReplay
is not added and it's expected.
Oh, sorry, didn't find it in the search results.
@justinwoo Don't feel sorry, I also feel searching issue in github is bit hard sometime :) Glad questions solved.
.publishReplay().refCount()
We should have something similar ... but I'm not sure I'd want to name it shareWhatever
at this point. share()
has a slightly different and more ergonomic behavior than publish().refCount()
. I'd like to add some sort of cache()
operator that does what shareReplay
was used for, but with perhaps more extensible arguments than a simple count to control things like expirey, etc. We started some discussion in #839 but it petered out.
I think we sort of agreed to cut the excess in share operators, and I like it if people understand what a ConnectableObservable is and that you need to call "connect()" and how refCount is sort of auto-connect. Because share()
can sometimes be understood as a blurred concept of "make this cold become hot".
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Should we have this operator? People could just
ReplaySubject
, but maybe this is nice to have.Might require
replay
to be implemented if this were added though (which, iirc, just uses ReplaySubject under the hood anyway).shareReplay in RxJS4