Hacker News new | past | comments | ask | show | jobs | submit login

Are these "common" mistakes? With basic understanding of Promises, these mistakes shouldn't happen. Also I believe #1 is wrong when using async/await.



> 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).


Some older libraries will still be callback driven, and one important thing is always resolving or rejecting promise.


If it's callback driven, is it a Promise mistake or a callback mistake? I don't think it would apply here


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




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: