警告 : 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.

解决方式

componentWillUnmount = () => {
    this.setState = (state,callback)=>{
      return;
    };
}

标签: 内存, 溢出, tasks, cancel, asynchronous, react, indicates, componentWillUnmount

相关文章推荐

添加新评论,含*的栏目为必填