re: What you might not know about async/await VIEW POST

FULL DISCUSSION
 

I don't understand what the point of this post. If you're using async/await the whole point is you are waiting for the promise resolution, that much is obvious.

 

If you're using async/await the whole point is you are waiting for the promise resolution, that much is obvious.

Absolutely correct. However, to use a cooking metaphor, to make eggs on toast you don't have to wait for the toast to be done to make the eggs. You can concurrently make both the eggs and the toast, which would reduce total cooking time. 😋

To use another cooking metaphor, to make devilled eggs, you must first wait for the eggs to boil before cutting and serving. As such, you cannot concurrently make the eggs with the egg paste.

tl;dr the best way to use async/await is contextual and depends purely upon your situation.

code of conduct - report abuse