3 ms·
Are these "common" mistakes? With basic understanding of Promises, these mistakes shouldn't happen. Also I believe #1 is wrong when using async/await.
by CraftThatBlock 7y ago
Are these "common" mistakes? With basic understanding of Promises, these mistakes shouldn't happen.
Also I believe #1 is wrong when using async/await.
- tehlike 7y agoSome older libraries will still be callback driven, and one important thing is always resolving or rejecting promise.
- CraftThatBlock 7y agoIf it's callback driven, is it a Promise mistake or a callback mistake? I don't think it would apply here
- tehlike 7y agoMost 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
- jonny_eh 7y ago> With basic understanding of Promises, these mistakes shouldn't happen That's why blog posts like this exist, to teach people the basics. In the real world people often start using technology before they fully understand it, and then get sent blog posts like this to read (or catch them on HN).