摘要: 父组件每次改变state,都会触发render,然后触发子组件,如果不用触发子组件可以用 shouldComponentUpdate声明周期控制 在子组件里放入: shouldComponentUpdate(nextPros) { console.log('是否更新了'); if (nextPros 阅读全文
posted @ 2021-04-22 11:47 小小鱼丸 阅读(1783) 评论(0) 推荐(0) 编辑