# Promise 사용
useEffect(() => {
const users = [1, 45, 67, 12, 976, 473, 2]
users.reduce((prevPromise, user) => { // [A]
const currentPromise = prevPromise.then(() => { // [B]
return axios.delete(`https://example.com/user/${user}`) // [C]
});
return currentPromise;
}, Promise.resolve()) // [A]
})