对unmounted_component执行setState

对unmounted_component执行setState

什么情况下,React可能会对unmounted component执行setState? #

  1. 异步请求数据尚未结束时,组件已经卸载了。
  2. 卸载时没有清除清除listener。
  3. 卸载时没有清除interval。

Viewpoint #

From #