Hello everybody 👋! I created this GIF cheatsheet for my own reference and I hope it will be useful for the community as well ❤️
- How is this organized?
Consider the GIFs like watching a slow-mo video of Promise API methods in action. The scenarios for each Promise API describe how they work with an emphasis on Promise status transition, value/reasons, and the order.
|Color Code||Promise Status||What it means|
||Represents initial state. The operation represented by the promise is neither fulfilled or rejected.|
||Operation is successful and result value is assigned. Typically, values appear on top of the respective promises upon fulfillment|
||Operation unsuccesful and usually there is a reason for rejection. It appears on top of the rejected promise|
For the sake of simplicity, I have added numbers below each promise representing the order in which they settle. This is handy while understanding the short-circuiting behavior (denoted by ⚡️) of each promise API.
⚠️ Warning- Promise.any() method is experimental and not fully supported by all browsers. It is currently in the TC39 Candidate stage (Stage 3).
And hey, I love staying in touch with the curious folks and learning from them as well! ❤️ So, Please feel free to reach out if you have any questions or interesting thoughts 🙋♀️🙋♂️Don't forget to share this post if you found it useful 🚀
Repo Link :