Files
freeCodeCamp/guide/english/certifications/front-end-libraries/redux/combine-multiple-reducers/index.md
Randell Dawson 1494a50123 fix(guide): restructure curriculum guide articles (#36501)
* fix: restructure certifications guide articles
* fix: added 3 dashes line before prob expl
* fix: added 3 dashes line before hints
* fix: added 3 dashes line before solutions
2019-07-24 13:29:27 +05:30

35 lines
695 B
Markdown

---
title: Combine Multiple Reducers
---
# Combine Multiple Reducers
---
## Problem Explanation
The goal of this challenge is to combine two reducers into a single reducer which will be passed into the ```Redux.createStore()``` method.
---
## Hints
### Hint 1
Use the method ```Redux.combineReducers()```. Pass an object as an argument.
### Hint 2
The object should have two ```name:value``` pairs. The ```value``` corresponds to the reducer function
---
## Solutions
<details><summary>Solution 1 (Click to Show/Hide)</summary>
```javascript
// define the root reducer here
const rootReducer = Redux.combineReducers({
count: counterReducer,
auth: authReducer
});
```
</details>