書名: Redux Quick Start Guide作者名: James Lee Tao Wei Suresh Kumar Mukhiya本章字?jǐn)?shù): 52字更新時(shí)間: 2021-07-02 12:40:32
Configuring the root reducer
Our root reducers can reside in a reducers.js file. We are going to use the combinedReducers utility function from the Redux library:
import { combineReducers } from "redux";
import history from "utils/history";
export default function createReducer(injectedReducers = {}) {
const rootReducer = combineReducers({
...injectedReducers
});
return rootReducer;
}
推薦閱讀
- Computer Vision for the Web
- Learning Selenium Testing Tools with Python
- Apache Spark 2.x Machine Learning Cookbook
- Vue.js 2 and Bootstrap 4 Web Development
- Visual Basic程序設(shè)計(jì)(第3版):學(xué)習(xí)指導(dǎo)與練習(xí)
- Java游戲服務(wù)器架構(gòu)實(shí)戰(zhàn)
- INSTANT Django 1.5 Application Development Starter
- 從零開始:UI圖標(biāo)設(shè)計(jì)與制作(第3版)
- OpenCV 3.0 Computer Vision with Java
- 會(huì)當(dāng)凌絕頂:Java開發(fā)修行實(shí)錄
- JavaEE架構(gòu)與程序設(shè)計(jì)
- Learning Cocos2d-JS Game Development
- Android初級(jí)應(yīng)用開發(fā)
- SAS編程演義
- PostgreSQL 12 High Availability Cookbook