shouldComponentUpdate 是做什么的?

shouldComponentUpdate 是做什么的?

点击查看代码
shouldComponentUpdate 这个方法用来判断是否需要调用 render 方法重新绘制 dom,因为 DOM
的描绘非常消耗性能,如果我们能在 shouldComponentUpdate 方法中能够写出更优化的 dom diff
算法,可以极大的提高性能
posted @ 2022-11-12 14:17  Cherishe  阅读(46)  评论(0)    收藏  举报