摘要: 做项目的过程中,来回切换页面时,一直遇到Can only update a mounted or mounting component 这个问题,原因是当离开页面以后,组件已经被卸载,执行setState时无法找到渲染组件。 解决办法特别简单,在离开页面时的周期函数(componentWillUnm 阅读全文
posted @ 2017-08-16 10:24 纸鸢&红豆·绿豆 阅读(6921) 评论(0) 推荐(0) 编辑