| 
									
										
										
										
											2018-10-12 15:37:13 -04:00
										 |  |  | --- | 
					
						
							|  |  |  | title: Combine Multiple Reducers | 
					
						
							|  |  |  | --- | 
					
						
							|  |  |  | ## Combine Multiple Reducers
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-17 14:52:48 +08:00
										 |  |  | The goal of this challenge is to combine two reducers into a single reducer which will be passed into the ```Redux.createStore()``` method.  | 
					
						
							| 
									
										
										
										
											2018-10-12 15:37:13 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-17 14:52:48 +08:00
										 |  |  | ### Hint 1
 | 
					
						
							|  |  |  | Use the method ```Redux.combineReducers()```. Pass an object as an argument.  | 
					
						
							| 
									
										
										
										
											2018-10-12 15:37:13 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-17 14:52:48 +08:00
										 |  |  | ### Hint 2
 | 
					
						
							|  |  |  | The object should have two ```name:value``` pairs. The ```value``` corresponds to the reducer function  | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ### Solution
 | 
					
						
							|  |  |  | ```javascript | 
					
						
							|  |  |  | // define the root reducer here | 
					
						
							|  |  |  | const rootReducer =  Redux.combineReducers({count:counterReducer, auth:authReducer}) | 
					
						
							|  |  |  | ``` | 
					
						
							| 
									
										
										
										
											2018-10-12 15:37:13 -04:00
										 |  |  | <!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds  --> |