Your post kind of neglects that async/await uses promises and that you can mix and match...

const value = await getValue(request).catch(() => null);

Or

const data = await fetch(url).then(r => r.json());

Second, I think that
Then chains are generally very ugly.

Third, async/await isn't just a JavaScript thing. Rust and C# have similar patterns, although they work differently under the covers.

Michael J. Ryan
Michael J. Ryan

Written by Michael J. Ryan

Food nerd (keto, omad, carnivore) — Programmer and JavaScript junkie! (node.js, mongodb, browser)

No responses yet