End
You now have a new tool in your toolbox when coding in JavaScript. Asynchronicity is what makes JavaScript a magical language. Using a Promise
coupled with the right pattern will increase readability and make tomorrow's applications easier to write.
getBook("Promise Handbook")
.then(readBook)
.then(digestConcepts)
.then(practiceConcepts)
.then(masterPromises)
.catch(napAndTryAgain)
References
- Kornel Lesiński: And .then() what? Promise programming patterns – Falsy Values 2015
- test double: Common Patterns Using Promises
- ponyfoo: Understanding JavaScript’s async await
Note From Author
I learned so much in the making of this book about promises. I went from only really understanding the basic concepts of promise.then
to constructing useful patterns and extensions. I cannot recommend this path enough for anyone wanting to learn about something. Get yourself to write a book about a topic you want to learn more about. My students, colleagues, and partner were all incredibly supportive in going over my edits and providing suggestions.