강의 정리/React JS
err 리엑트 : useEffect 에서 axios 사용 (async 에러 발생) destroy is not a function
끼록관
2023. 2. 23. 16:58
https://stackoverflow.com/questions/71769990/react-18-destroy-is-not-a-function
React 18 - destroy is not a function
My application was working fine, then I updated it to react 18, now it is throwing "destroy is not a function" when I navigate from one route to another if the current route is using useE...
stackoverflow.com
프로젝트 하던중에
검색할때 로그인 값이 없으면, 검색이 되지 않던 오류가 생겼다.
이유는
useEffect 안에 함수를 적어놔서.... 로그인값을 요구하게 되었다
밖에 따로 함수를 해놓고, 저렇게 하니 오류가 수정됬다.
수정본
