Subscriptions
Let's see how we can solve the problem associated with cold observables and make a single request but distribute it to multiple subscribers with the use of a "share" and "publish" operator in RxJS.
We'll cover the following...
Sometimes we don’t want to trigger the creation logic every time another part of your application wants to listen to the result.
Consider an AJAX request that fetches a user object:
let user$ = ajax('/user');
Access this course and 1400+ top-rated courses and projects.