Recently had a broseph tell me ‘Bro, Fr Fr do you even know how Async/Await works! Ya gotta use Promises.’ Honestly that bothered me more than a perky product owner up in my grill on a 8am standup after the dev team worked all weekend because said pr...
Markdown supported · ⌘↵ to post
Well put, although I find writing out promises as they stand to be more intuitive and explicit than async/await. Perhaps that's because of the way my eyes are trained to scan code, as they tend to hide in the underbrush. Props for calling out the Dark Ages of Callbacks.
Tanner Woody
Awesome read and great article!
In regards to complex and large overhead setups: I would recommend an honorable mention to wrapping multiple
async"tasks" in anawait Promise.all([task1, task2, task3])This style will run the three different tasks in parallel, which can make this specific example 3x faster (assuming all three tasks take equal time to execute and are the only thing we are benchmarking)