博文

目前显示的是 十一月, 2019的博文

React 的性能优化 shouldComponentUpdate 与 PureComponent

图片
react 的一个常见优化方式是使用 shouldComponentUpdate 生命周期对不需要更新的组件调停,但当组件多起来就非常麻烦,那有没有更合理方便的方式呢?