Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
ES 5-6-7: From Callbacks to Promises to Generators to Async/await (medium.com/rdsubhas)
2 points by michaelsbradley on Jan 6, 2017 | hide | past | favorite | 1 comment


My experience with Generators have been mostly with Redux/Saga, and thus I am now of the opinion that they are the superior choice for asynchronous operations for the sole benefit of testing. With Promises you can test the value and the state.

Generators let you test any yield. So you can test not only the operations but the side effects as well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: