Web 2.0 时代的并发编程 (cont'd)
Promise: 描述动态计算图
useEffect(() => {
fetch(`/api/localhost/?action=demo&path=${path}`)
.then(response => response.json())
.then(fetchedData => setData(fetchedData))
}, []);
Promise.all([
fetch(...).then(...),
fetch(...).then(...),
fetch(...).then(...),
]).then(
).catch(
)