4 ms·
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 fl
by qudat 5y ago
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://redux-saga.js.org
https://github.com/neurosnap/cofx https://github.com/neurosnap/cofx
Generators provide much better flexibility over flow control and allow us to treat side effects as data.