function visibilityFilter(){} function todos(){} import { combineReducers, createStore } from 'redux'; let reducer = combineReducers({ visibilityFilter, todos }); let store = createStore(reducer);
combineReducers这个方法把传进去的那个包含两个属性的对象怎么着了?
欢迎选择我的课程,让我们一起见证您的进步~~
把几个reducer(visibilityFilter, todos)合成一个reducer。官方解释combineReducers源码
合并为一个switch/case
把几个reducer(visibilityFilter, todos)合成一个reducer。
官方解释
combineReducers源码
合并为一个switch/case