Good evening, fellows!
Let's simplify the use of Promises?
Particularly, when I started with the concept of Promises when I learned how to code, ...
For further actions, you may consider blocking this person and/or reporting abuse
Just be careful with
Promise.all
, if one promise fails, then all are considered rejected. IMO, using Promise.allSettled is a better approach - but also a much newer method.Thanks for the tip, never have I ever use Promise.allSettled. But I'm working in part 2 with more details about Promises. ;)
Great tip as well! I never knew that this existed, thanks. I'm just starting out on the new ES version
Good post! If anyone is interested, I wrote an interactive promises post long ago here: davydm.blogspot.com/2015/07/callba...
It gives some insight into promise usage and interoperability - different promise implementations (native, jQuery, q, bluebird, others) work together because of duck-typing - as well as a look at building your own implementation. I've built my own implementation of promises more than once - mostly for interest, but twice (re-coded from scratch when the architecture made fixing a particular bug near impossible) for synchronous-promise, an implementation of promises which doesn't background, on purpose, originally to make async testing easier, but it turns out people have found other uses for it.
I've been meaning to port the blog post above to dev.to (it uses an iframe to get the interactive content loaded from GitHub - so you can check out the source there too)
Thank you for the comment and for sharing your post! I’d love to read it 😉
Great! I learned a lot not in 15 minutes but just 5 😊
promise accomplished haha
Thank you!
Good article, I thought I didn’t understand promises well until I read your post. With each explanation and example there was, “yup”. Promise.all, Settled and .RACE are new concepts for me. Well done.
Thank you for the comment!! Sometimes we just need a simple abstraction to understand concepts in programming. I’m glad you liked ❤️
Great, love the text. Which tool do you use to create these screen shots? They're so amazing
Thank you! I’ve used carbon.now.sh.
thanks!! =) awesome tool!! love it
Please do one for observables?
Sure !
Great simple explanation, the programming world can use more articles like these! 🙌
thank you so much! ;)
Great tutorial. Thumbs up cause I really learned it in less than 15minutes with your article!
YAAY, thanks a lot!
Excellent! helped me to get a contrasting idea of promise and callback
Glad you liked ;)