Implementing fromSubscriber in rxjs
I ran into an interesting issue today. I'm working on an app where we have file uploads, and we want to implement a progress bar. The app is written using React/Redux/Redux-Observable. I want to dispatch actions for upload progress. Here's what I did to implement it: withProgress(method, url, body = {}, headers = {}) { const progressSubscriber = Subscriber.create(); return { Subscriber: progressSubscriber, Request: this.ajax({ url, method, body, headers, progressSubscriber }), }; } I have a class that I use to make all my ajax requests. this.ajax calls Observable.ajax with the passed in