Hey! 👋
Check out today's ⚡️ Dev Tip 💡 👇
Follow me on Twitter @shahzaibkhalid for more Dev Tips! ✨
Let’s say we want to run many promises to ex...
For further actions, you may consider blocking this person and/or reporting abuse
I feel like for consistency, it should be
status: 'resolved'
rather thanstatus: 'fulfilled'
. Otherwise, that's pretty neat!The concept is great, but some renaming I think would be nice. I think the most important renaming should be
status: 'resolved'
rather than'fulfilled'
, and perhaps renamingPromise.allSettled
to something else... Not quite sure yet.Dean, the specification uses the following naming convention:
Just looked this up on MDN, didn't know that this was the current specification! Thanks for letting me know.
Thanks for sharing!
As far as I know, you can achieve the same result with Promise.all by attaching a ‘.catch()’ to each promise in your array.
Yes, we could but
Promise.allSettled
is more concise. 🚀I think you can only handle the first error that way, not the other errors or successes.