본문 바로가기
Front-End/ReactJS

[ReactJS] 동시에 ajax 요청 여러개하기

by developerDoorold 2023. 3. 6.
Promise.all([ axios.get('/url1'), axios.get('/url2') ])
    .then(()=>{
        // 위 두 요청이 둘다 성공했을 때 작동
	})
    .catch(()=> {
    
	})

댓글