Re:Optimizing React Rendering
by ma_long_bay on Thursday May 25, 2017 @06:50PM
(#14420751)
how expensive are shallow === checks compared to re-rendering unnecessarily though? what advantages would stateless functional components offer above purecomponents?
[ Parent
| on HN ]
If your check returned true, you'll re-render anyway, so time for this check is effectively wasted. Imagine that every check returns true. It's better to avoid this check at all in that component.
Re:Optimizing React Rendering
by ma_long_bay on Thursday May 25, 2017 @06:53PM
(#14420765)
to clarify, i meant stateless functional components after they've been optimized in React 16