“`”

shouldComponentUpdate这个方法用来判断是否需要调用render方法重新描绘dom。因为dom的描绘非常消耗性能,如果我们能在shouldComponentUpdate方法中能够写出更优化的dom diff算法,可以极大的提高性能。
详细参考:<a class=""url"" href=""https://segmentfault.com/a/1190000006254212"" target=""_blank"">https://segmentfault.com/a/1190000006254212</a>

<pre><code> "“`

Was this helpful?

0 / 0

发表回复 0

Your email address will not be published.