React.js
react componentwillunmount 이거 어떻게 할까
게슬
2020. 1. 15. 10:35
728x90
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 the componentWillUnmount method. 오류가 뜨는데 음 구독중인거랑 동기화?하는일을 취소해라고 함
자꾸 이게 뜨는데 해결방법을 잘 모르겠어서 찾는중임
1.chat에 연결된 이벤트를 unmount할때 다 지우기
2.MainPage에서 unmount할때 chat을 지우기
모르겠다
728x90