News for hackers. Stuff that matters.
Re:Optimizing React Rendering by abritinthebay on Thursday May 25, 2017 @02:17PM (#14419036)
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.

There are no comments on this comment yet.