最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Find over-subscribed mapStateToProps functions in Redux - Stack Overflow

programmeradmin4浏览0评论

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?

发布评论

评论列表(0)

  1. 暂无评论