Difference of using async / await vs promises?

后端 未结 5 1571
Happy的楠姐
Happy的楠姐 2020-12-03 08:42

I am looking for a answer on what to use in my nodeJS app.

I have code which handles my generic dB access to mssql. This code is written using an async

5条回答
  •  有刺的猬
    2020-12-03 09:13

    At this point the only reason to use Promises is to call multiple asynchronous jobs using Promise.all() Otherwise you’re usually better with async/await or Observables.

提交回复
热议问题