3 ms·
Await basically splits function in two functions (before and after) and uses second function as a callback for promise then. Error handling makes it a little bi
by vbezhenar 5y ago
Await basically splits function in two functions (before and after) and uses second function as a callback for promise then. Error handling makes it a little bit more complex, but not much. Babel seems to make it harder than it needs to be, but may be that makes sense from performance or maintainability perspective.