Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was really hoping this article would discuss the benefits of using raw generators over async/await.

By using async/await, we are inherently limited by the flow control because we are forced into await resolving promises.

This is why libraries like redux-saga[0] or cofx[1] use generators.

https://redux-saga.js.org https://github.com/neurosnap/cofx

Generators provide much better flexibility over flow control and allow us to treat side effects as data.



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

Search: