Redux------combineReducers(reducers:Object)
作用:把一個由多個不同 reducer 函式作為 value 的 object,合併成一個最終的 reducer 函式。
引數:Object型別,以各子reducer的函式名作為key,函式體作為value;
返回值:一個整合以後的Reducer函式。
## rootReducer.js
import { combineReducers } from 'redux';
import reducer1 from './reducer1';
import reducer2 from './reducer2';
export default combineReducers({
reducer1, //es6寫法:等同於: reducer1 : reducer1
reducer2 //es6寫法:等同於: reducer2 : reducer2
})
相關文章
- [譯] Reducers VS Transducers
- MapReduce: number of mappers/reducersAPP
- 為什麼Redux 需要 reducers是純函式?Redux函式
- dva應用中reducers和effects的單元測試實戰
- Uncaught TypeError: Object [object Object] has no method 'xxx'ErrorObject
- ObjectObject
- 介面返回[object,Object]解決方法Object
- Effective Object C 2.0 『熟悉Object C』Object
- ES7 Object.keys,Object.values,Object.entriesObject
- Object被其他的Object引用的SQLObjectSQL
- OBJECT_ID和DATA_OBJECT_IDObject
- Object流Object
- 其它 ObjectObject
- object in javascriptObjectJavaScript
- Authorization ObjectObject
- object類Object
- Differences between DATA_OBJECT_ID and OBJECT_IDObject
- object_id 及 data_object_id (oracle)ObjectOracle
- Object.seal()與Object.freeze()區別Object
- CSS3 object-fit 和 object-positionCSSS3Object
- object_id and data_object_id in dba_objectsObject
- Iterable object of JavaScriptObjectJavaScript
- JavaScript Object 物件JavaScriptObject物件
- Object.defineProperty()Object
- Object.isSealed()Object
- Object.isFrozen()Object
- Object.defineProperties()Object
- Object.is()方法Object
- Object.seal()Object
- Object.preventExtensions()Object
- Object.create()Object
- Object.setPrototypeOf()Object
- Object.getOwnPropertyNames()Object
- Object.getPrototypeOf()Object
- Object.getOwnPropertyDescriptor()Object
- Object.is()與'==='Object
- object-detectionObject
- JAVA Object類JavaObject