每次状态更改时都会调用重新选择选择器参数

问题描述

我的状态是为了简单

export default combineReducers({
    combinedReducer1,combinedReducer2,});

我有一个 mapStatetoProps 如下:

 const mapStatetoProps = state => ({
    reducer1: testReselect(state)
});

testReselect 在哪里

const testReselect = createSelector(
    state => state,state => state
);

并且我看到在 combineReducer1 中的每个嵌套更改上都调用了重新选择。任何嵌套状态更改中的 rootState 引用不应该相同吗?如果没有,使用重新选择有什么意义吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)