집 > Q&A > 본문
function visibilityFilter(){} function todos(){} import { combineReducers, createStore } from 'redux'; let reducer = combineReducers({ visibilityFilter, todos }); let store = createStore(reducer);
combineReducers这个方法把传进去的那个包含两个属性的对象怎么着了?
巴扎黑2017-04-10 18:08:09
把几个reducer(visibilityFilter, todos)合成一个reducer。官方解释combineReducers源码
怪我咯2017-04-10 18:08:09
合并为一个switch/case