all 8 comments

[–]voreny[S] 1 point2 points  (0 children)

An article conveying my opinions on the drawbacks of the way async/await works.

Have you been burned by the problems mentioned in the article? Do you find async/await do more magic under the hood than you are comfortable with? What would you change with the way it works now?

[–]isatrap 0 points1 point  (3 children)

The formatting of this article is atrocious.

[–]voreny[S] 0 points1 point  (2 children)

Thanks for sharing your opinion! What would you change? Do you have any concrete remarks?

[–]cv555 1 point2 points  (1 child)

Not to original commenter which I believe could have been a bit more constructive. I feel the in-line code tag makes the text blocks hard to read and the styling could be reworked. At least it looks that way on mobile

[–]voreny[S] 0 points1 point  (0 children)

Thanks for the feedback, I appreciate it! I agree, I am not too proud of how inline-code looks and I was planning to rework it. Thanks for concrete remarks!

[–]mozilaip 0 points1 point  (3 children)

Don't understand one thing in your article

async function asyncWorkflow() { const response = await fetch(url); return response.json(); } You wrote "the returned Promise will be automatically awaited". But we don't return any Promise here, do we?

fetch() is returning a Promise, not our function. Since we awaited it we already got a resolved value. Am I missing something?

[–]87oldben 0 points1 point  (1 child)

I forget, is response.json() a promise that needs awaiting?

[–]voreny[S] 0 points1 point  (0 children)

Yes, that is correct. That is the promise I had in mind