Echo JS 0.11.0

domagojk 482 days ago. link parent 1 point
Personally, I would use some redux middleware, but if you don't want that, and you need your ajax call to result in component state change, you can use RxJS ajax and switchMap inside update() function.

Similar to featured example with Observable.interval(1000), you would then use Observable.ajax and ajax response would be passed in "reducer" operator where you can change a component state.

If, however, you're using Redux but don't wish any middleware, you can dispatch ajax response the same way - only when ajax is completed, an action would be dispatched.


xat 482 days ago. link 1 point
Thanks, I somehow overlooked the Observable.interval(1000) example.