Too Long; Didn't Read
Share is an rxjs operator that you can easily implement using. It prevents multiple identical requests in the Network tab. The result is 6 identical API calls in a project that has multiple components that need the same resource. An easy solution is to share observables. You can create a variable to keep a reference to the ongoing request. Make a request and share it so that this can become a multicast observable. Also make sure to remove the reference once we get a response from the request. This will not cache the value.
Share Your Thoughts