Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed bug were it would make multiple xhr requests #240

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

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.

2 participants