Almost all API methods return a promise even if the whole code is synchronous.
Is there any reason why force to use promises?
In my current code, I had a forEach loop, and I had to refactor it to Promise.map and use async/await.
I think it's not a good practice to wrap everything in promises. A synchronous code is always easier to read than asynchronous.
Almost all API methods return a promise even if the whole code is synchronous. Is there any reason why force to use promises?
In my current code, I had a
forEach
loop, and I had to refactor it toPromise.map
and useasync/await
. I think it's not a good practice to wrap everything in promises. A synchronous code is always easier to read than asynchronous.