3 ms·
How so? My understanding is you'd still need to implement shouldComponentUpdate in the class component.
by ioseph 5y ago
How so? My understanding is you'd still need to implement shouldComponentUpdate in the class component.
- dandelany 5y agoYou can just use PureComponent instead of implementing shouldComponentUpdate, but you're right that it doesn't come "for free". PureComponent : class components :: memo : function components