2 ms·
With the callback methods it was really a hassle. With async/await is so nice now. await step1() await step2() That's it.
by emilsedgh 8y ago
With the callback methods it was really a hassle.
With async/await is so nice now.
await step1()
await step2()
That's it.
- LargeWu 8y agoI get what you're saying, and yes, async/await is much better. But the entire reason it has to exist (and be used everywhere) is because javascript's default async behavior gets in the way so often. The irony is that when I do want some sort of async behavior, I often have to reach for something like bluebird anyway because I want better control over the Promises. So either I'm circumventing JS's default behavior by using async/await, or using a library that makes promises manageable. Almost never is it preferable to me to use JS's standard plain async behavior.