最佳答案
我有一个问题,关于反应的 shouldComponentUpdate
(当没有覆盖)。我确实更喜欢纯粹的功能组件,但是我担心它每次都会更新,即使道具/状态没有改变。
因此,我正在考虑改用 PureComponent 类。
我的问题是:
功能组件是否与 PureComponent 具有相同的 shouldComponentUpdate
检查? 还是每次都更新?