报错:Warning: Can't perform a React state update on an unmounted component.

304 阅读1分钟

报错: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.

解决:组件销毁之后 该组件内有定时器没有销毁清理 ,清理掉就好了