Honestly I just find the async await pattern so much cleaner anyway, stringing together .then().catch().error() etc... always looked super ugly to me, whereas having a function you can just await and then deal with however you want to after is clean.
Honestly I just find the async await pattern so much cleaner anyway, stringing together .then().catch().error() etc... always looked super ugly to me, whereas having a function you can just await and then deal with however you want to after is clean.
I agree with you. Sometimes we have to use new Promise ... but in at the moment I'm sure I've forgotten this video.
I also agree, async await is always better :)
For me also async await is much cleaner and readable. However this is handly where the situations we forced to use promises.
pretty cool, some nice sugar. Also prevents the antipattern of an async anon function in a Promise constructor
Thank you!
👍😎👍
Awesome
You promised that you would make a vedio on how Discord would have avoided Cassandra beforehand
Why not just return Promise.resolve(data) or Promise.reject(error)?
great video :)
Thanks! 🙏
Can't we always use async keyword to implicitly return a promise instead of explicitly returning a new promise? 🤔