- Redux Quick Start Guide
- James Lee Tao Wei Suresh Kumar Mukhiya
- 52字
- 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;
}
推薦閱讀
- UNIX編程藝術
- HTML5+CSS3+JavaScript從入門到精通:上冊(微課精編版·第2版)
- Node.js+Webpack開發實戰
- INSTANT OpenCV Starter
- DevOps Automation Cookbook
- Julia機器學習核心編程:人人可用的高性能科學計算
- Modern JavaScript Applications
- bbPress Complete
- Java:High-Performance Apps with Java 9
- RabbitMQ Essentials
- Mockito Essentials
- 大學計算機基礎實驗指導
- C語言程序設計
- Using Yocto Project with BeagleBone Black
- 高性能PHP 7