.NET Rocks!

Javascript Promises with Martine Dowden

22 snips
Mar 27, 2025
Martine Dowden, an award-winning CTO and UX/UI expert, dives into the fascinating world of JavaScript promises. She explains the power of async programming, showcasing tools like Callbacks, Promises, and Async/Await. Martine shares intriguing features such as grouping sync calls and the race condition that favors rapid completion. With her insights, developers can navigate the complexities of asynchronous code and enhance user interfaces effectively. Plus, she reveals common pitfalls and offers strategies to manage errors in networking scenarios.
Ask episode
AI Snips
Chapters
Transcript
Episode notes
INSIGHT

Promises handle async operations

  • JavaScript promises, often used with fetch, handle asynchronous operations.
  • They allow chaining operations with .then and don't always require returning a promise.
ADVICE

Using Promise.all

  • Use Promise.all for multiple fetches that must all return before proceeding.
  • If one fails, all fail, which can be advantageous depending on the use case.
ADVICE

Parallel fetches

  • For parallel, independent fetches, use separate functions or chain .then calls.
  • Avoid async/await in this case, as it enforces sequential execution.
Get the Snipd Podcast app to discover more snips from this episode
Get the app