리액트에서 AJAX 사용하기 위해 설치를 해준다. 더보기 npm i axios { /* axios.Method('서버url') .then((변수)=>{}) -> 성공했을 때 .catch(()=>{}) -> 실패했을 때 */ axios.get('https://raw.githubusercontent.com/professorjiwon/data/main/data2.json') -> 서버의 주소 .then((result)=>{ console.log(result.data); let copy = [...clothes, ...result.data] setClothes(copy) }) .catch(()=>{console.log('실패');}) /* - 서버로 보낼때 axios.post('서버 url', 보낼 데이터) ...