Optimization to prevent multiple rendering with PureComponent or shouldComponentUpdate
Closed this issue · 1 comments
nbkhope commented
I have a project with a lot of modals at the same, top level, and many of them render unnecessarily because one of them opened. Using PureComponent (or defining a shouldComponentUpdate) could prevent the unnecessary rendering and improving performance.
Would it be possible to allow for optimization using a PureComponent
for the connected modal component instead of just Component?
yesmeck commented
react-redux
will treat connected component as pure by default. So I think you don't need PureComponent
.