welldone-software/why-did-you-render

Wdyr ignores equality function in useSelector

开放

#190 创建于 2021年4月16日

 (3 条评论) (1 个反应) (0 位负责人)JavaScript (188 个派生)batch import
Low prioritybuggood first issuehelp wanted

仓库指标

星标
 (10,560 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

When using wdyr I noticed that it reports unnecessary renders caused by useSelector with an equality function even though the equality function causes the render to be avoided. Looking at the code it looks like wdyr does not consider the result of the equality function.

An example:

useSelector(someSelector, (prev, next) => true);

贡献者指南