
How to share your RxJS observables for improved performance
In this tutorial, we investigate how to cache and share an observable stream so that we don't need to continually call the set up code for the source observable for each new subscription (e.g. we don't need to make multiple HTTP requests, or set up web sockets, or other potentially expensive operations).
Get weekly content and tips exclusive to my newsletter: https://mobirony.ck.page/4a331b9076
0:00 Introduction
0:56 A "cold" observable
2:38 Caching the observable
3:40 Making it "hot" with share
5:22 shareReplay
7:48 refCount
Caching and Sharing Firestore Data with RxJS and ShareReplay: https://eliteionic.com/tutorials/caching-and-sharing-firestore-data-with-rxjs-sharereplay/
#angular #rxjs #observables
- More tutorials: https://eliteionic.com
- Follow me on Twitter: https://twitter.com/joshuamorony