iT邦幫忙

2023 iThome 鐵人賽

DAY 9
0
Modern Web

前端知識系列 第 24

PromiseAll-vs-AllSettled-Demo

  • 分享至 

  • xImage
  •  

PromiseAll-vs-AllSettled-Demo

Description

This repository contains a React application that demonstrates the differences between Promise.all and Promise.allSettled with and without using .then().

Features

  • Demonstrates usage of Promise.all and Promise.allSettled.
  • Shows how .then() can be used with these Promise methods.
  • Provides a UI to trigger the promises and view the results.

What I Learned

  • How Promise.all and Promise.allSettled behave differently.
  • How to use .then() with these Promise methods.
  • How to handle asynchronous operations in React using useState.

https://stackblitz.com/edit/stackblitz-starters-tizzyf?file=src%2FApp.js


上一篇
如何使用 Promise.race + AbortController 取消多個過長請求
下一篇
2023/10/29
系列文
前端知識30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言