H
H
HoHsi2015-10-09 15:40:24
JavaScript
HoHsi, 2015-10-09 15:40:24

Which is better to use async.js or promise?

Good day!
What is the best way to organize asynchronous code in Node.js? The old-fashioned way through callback noodles wrapped in async.js or through yield and promise?
Which option is more reliable and convenient? (because I just recently started working with promise, I felt something wet in my ear. I felt it, and it turns out that the brain is leaking).
PS Also, where can we use yield besides asynchronous code?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
T
Timur Shemsedinov, 2015-10-09
@MarcusAurelius

The fastest and most reliable is callback hell, go back to basics.

O
olegcorner, 2015-10-09
@olegcorner

Node Events

B
bromzh, 2015-10-09
@bromzh

Pure promises are the same noodles, only in profile. Well, only the investment is reduced. Generators and yield look better.
Where generators are needed

O
ofstudio, 2015-10-12
@ofstudio

bluebird

K
Kostya Nechaev, 2015-10-23
@kos403

async

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question