That's much nicer than the alternative, which I'm not gonna type out cuz it was hard enough doing that much from my phone. But it is.
Especially if the first functions wasn't async and you had only a conditional async fn.
This isn't the greatest example, but there is a lot of stuff like this that gets much less messy with async/await. Especially if you are adding it after the fact, etc.
One of the biggest boons for async/await over .then is working with if statements and such:
That's much nicer than the alternative, which I'm not gonna type out cuz it was hard enough doing that much from my phone. But it is.
Especially if the first functions wasn't async and you had only a conditional async fn.
This isn't the greatest example, but there is a lot of stuff like this that gets much less messy with async/await. Especially if you are adding it after the fact, etc.
Haha, that makes sense! And weirdly enough, I started this post on my phone and quickly switched over to my laptop. 😂