I am new to Redux and am trying to diagnose some performance issues in an application. My understanding is that the return of mapStateToProps
will be shallow-compared with its previous return and trigger a rerender if there's a difference.
Many of our mapStateToProps
functions return objects with dozens of entries and I wonder if some of those are no longer used by the component. Typescript does not complain if an object has additional entries.
Is there a way to detect any mapStateToProps
functions which have return values with extra properties not used by the component?