News for hackers. Stuff that matters.
Re:Async/Await will make code simpler by jrs95 on Monday August 21, 2017 @02:23PM (#15066501)
Only downside I've found with this is that Observables feel like more of a pain to test, since your logic gets more tightly coupled to your I/O. Or at least there's more complexity involved in the relationship between I/O and data manipulation. I used them for a Node project via RxJS and ended up just switching back to promises, as it wasn't complex enough of a project to really see much of a benefit from Observables.
Re:Async/Await will make code simpler by rounce on Monday August 21, 2017 @05:31PM (#15068019)
The only difference between promises and observables are multiple-emission & cancelation, they shouldn't be any more complicated to use or test than promises. Often I find the main complicated part is the source, everything else is just filter/map functions, sometimes to more streams. All of these individual units are more easily described/tested in comparison to the entire chain (and even then you are only caring about the ends of it).
Re:Async/Await will make code simpler by alexkoeh on Monday August 21, 2017 @02:57PM (#15066785)
Along with that, generators (redux-saga) are amazingly simple to test.