If we use the redux HOC mapStateToProps - we de-structure certain properties from the various sub-reducers available in our React application.
Over time, 2 things happen:
- some properties being extracted are not being used (if the code using it gets deleted)
- we extract a more generic property (a big large object) instead of specific smaller values from redux.
If we fix both these problems - in a large codebase of about 150-200 classes - will there be a significant jump in performance (since now there is lesser re-rendering) ?
Thanks
Fixing these issues can significantly improve the overall performance of your app and reducing the number of unused field from
mapStateToPropswill reduce the number of data that is passed through the component hierarchy which will result in less re-renders and keep in mind that using specific property instead of passing whole objects significantly improves the performance as we were also facing the same issues in our app and made these changes. Thank you.