HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
🧚
[1기]최종 프로젝트 데브코스
/
[팀3] 아이육
[팀3] 아이육
/
🏷️
거창하지 않은 Article 저장소 ヾ(•ω•`)o
/
Can't perform a React state update on an unmounted component

Can't perform a React state update on an unmounted component

날짜
Dec 15, 2021
작성자
state? isLoading
unmounted component? AuthCodeForm
 
원인 : 비동기로 처리되는 useForm의 setIsLoading(false)가 AuthCodeForm이 언마운트된 상태에서 수행됐기 때문에 발생함
 
해결 : useEffect cleanup function을 사용
 
 
 
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.