DEV Community

Discussion on: All (or just most) of what you need to know about handling Promises

Collapse
 
iamthehttp profile image
IamTheHttp

Hey Ori,
Looks good,
I'd add a few 'Gotchas' and maybe some more information here!

  1. When using async/await it's very difficult to use finally and catch, async await only deals with 'resolve'

  2. Promises are a great way (and I think the only way) to add a micro task into the event loop, micro tasks are the only way to ensure execution before the next tick. (done with Promise.resolve())

  3. You could probably await a Promise.all() as well, as it returns a promise

Other than that, good stuff!

Collapse
 
orivolfo profile image
Ori Volfovitch

Thanks!