2 ms·
No, because PureComponent does have a check. His point is that you don't always need that check - that check has overhead too! Basically PureComponent is just
by abritinthebay 9y ago
No, because PureComponent does have a check.
His point is that you don't always need that check - that check has overhead too!
Basically PureComponent is just a specialized case of shouldComponentUpdate so it's better practice to be mindful of where you're calling that anyhow.
It's also why there's the push to use stateless functions (when you can) because the kind of pseudo micro-optimization that PureComponent actually is can have counter-intuitive consequences.