2 ms·
What helped me understand async await concept was to understand the concept of generators in javascript. One quick way to do it was to implement generator using
by cosmosgenius 5y ago
What helped me understand async await concept was to understand the concept of generators in javascript. One quick way to do it was to implement generator using ES5 javascript.
From generator then it was to see on how to implement async await using them. This was how 1.x version of koajs did (https://github.com/koajs/koa/blob/master/docs/migration.md https://github.com/koajs/koa/blob/master/docs/migration.md).
Another way was to understand how polyfill for an implementation works. eg. https://github.com/facebook/regenerator https://github.com/facebook/regenerator