Skip to content

Conversation

@wgu-edwin
Copy link
Contributor

@wgu-edwin wgu-edwin commented Oct 4, 2022

found that with multiple subscribers to an observable it would re-emit the execution chain aka send xhr requests for every subscriber. We were using the share method however that only allows to multicast aka allow multiple subscribers but it would still follow the chain and make all the computations it is subscribed to. After reading the docs, the shareReplay method allows for the replaying of values that was returned from the observable without making a costly xhr request for any amount of subscribers.

found that with multiple subscribers to an observable it would remit the
execution chain aka send xhr requests. We were using share method but share we
were using it incorrectly. After reading the docs, shareReplay method allows
for the replaying of values that was returned from the observable without making a
costly xhr request for any amount of subscribres.
@wgu-edwin wgu-edwin requested a review from JohnKallies October 4, 2022 05:09
@JohnKallies JohnKallies requested a review from hikr17 October 4, 2022 13:07
@JohnKallies
Copy link
Contributor

found that with multiple subscribers to an observable it would re-emit the execution chain aka send xhr requests for every subscriber. We were using the share method however that only allows to multicast aka allow multiple subscribers but it would still follow the chain and make all the computations it is subscribed to. After reading the docs, the shareReplay method allows for the replaying of values that was returned from the observable without making a costly xhr request for any amount of subscribers.

Most of this would make an awesome commit message :)

@JohnKallies JohnKallies marked this pull request as draft October 31, 2022 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants