Should I use Promises or Async-Awaitby@nkgokul
124,894 reads
124,894 reads

Should I use Promises or Async-Await

by Gokul N K4mAugust 17th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

I recently read a medium post where the author claimed that using <code class="markup--code markup--p-code">async-await</code> is better than using <code class="markup--code markup--p-code">promises.</code> While this might hold good in general cases, I think that generalisation was too broad and doesn’t do justice to either <code class="markup--code markup--p-code">async-await</code> or <code class="markup--code markup--p-code">promises.</code> For somebody who is new to Javascript making sense of these and decide which one to use can be a challenge. In this post I will list down things that I have learnt about these and how I decide when to use what. If you find anything interesting/useful in this article you can highlight them using our chrome extension <a href="https://bit.ly/highlights-extension" target="_blank">https://bit.ly/highlights-extension</a>

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Should I use Promises or Async-Await
Gokul N K HackerNoon profile picture
Gokul N K

Gokul N K

@nkgokul

Inquisitive, student, teacher and a wanna be story teller. Working on https://learningpaths.io/

About @nkgokul
LEARN MORE ABOUT @NKGOKUL'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Gokul N K HackerNoon profile picture
Gokul N K@nkgokul
Inquisitive, student, teacher and a wanna be story teller. Working on https://learningpaths.io/

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite