It’s also the clearest and least buggy way to iterate over the results. Map over Await Promise.all(map).
How bad is this? Should I switch to Promise.all instead?
Promise.all runs them all simultaneously and waits until they are all complete. It returns an array of results in the same order as the calls, so it's usually pretty straightforward to use.
Both approaches have a purpose, so it's not like you "should" strictly use one. But you should be aware of both and be able to use the one that fits the need.
- as soon as any of them resolve (any)
- when all of them resolve (all)
- resolve each in order (for)