Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
CraftThatBlock
· 7y ago · 0 comments
Are these "common" mistakes? With basic understanding of Promises, these mistakes shouldn't happen. Also I believe #1 is wrong when using async/await.
Comments
[–]
tehlike
7y ago
Some older libraries will still be callback driven, and one important thing is always resolving or rejecting promise.
[–]
CraftThatBlock
OP
7y ago
If it's callback driven, is it a Promise mistake or a callback mistake? I don't think it would apply here
[–]
tehlike
7y ago
Most of the time first thing i do is to wrap the library call in a promise. Callbacks are really bad after a few nested ones, bht promise doesnt eliminate all the problrms