Module 13 · Async 2: Promises, async/await and fetch
When to Use Which: await or then, all or allSettled, a Pool, or a Callback
Free with an accountReading
By now you know every tool. The hard part in real code is choosing. Zara reviews a pull request from a new teammate. The code works. Yet it awaits ten independent requests in a row. It uses Promise.all where one failure should not kill the page. And it wraps a click handler in a promise that stops listening after the first click.
Checking what this lesson needs for you…
What is inside When to Use Which: await or then, all or allSettled, a Pool, or a Callback
- await or then
- all, allSettled, race or any
- In a row, together, or a pool
- When a callback is still right
- Choosing by four questions
- The comparison table