为一个减速器调度的动作正在执行另一个减速器?

时间:2020-01-23 14:49:40

标签: redux redux-thunk

如果我为getList reducer调用操作,该操作将被同时分发到getList reducer(correct)getUser reducer(incorrect)

有人遇到这种错误吗?

1 个答案:

答案 0 :(得分:0)

Actions are not specific to a single reducer。可能只有一个减速器实际上在乎给定的动作,但是如果您使用的是combineReducers()all slice reducers will be called and given a chance to respond to each dispatched action