File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 9
9
"react" : " ^15.5.4" ,
10
10
"react-dom" : " ^15.5.4" ,
11
11
"react-redux" : " ^5.0.5" ,
12
- "redux" : " ^3.6.0"
12
+ "redux" : " ^3.6.0" ,
13
+ "redux-logger" : " ^3.0.6"
13
14
},
14
15
"scripts" : {
15
16
"start" : " react-scripts start" ,
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import ReactDOM from 'react-dom' ;
3
- import { combineReducers , createStore } from 'redux' ;
3
+ import { applyMiddleware , combineReducers , createStore } from 'redux' ;
4
4
import { Provider , connect } from 'react-redux' ;
5
+ import { createLogger } from 'redux-logger'
5
6
import './index.css' ;
6
7
7
8
// action types
@@ -85,7 +86,13 @@ const rootReducer = combineReducers({
85
86
filterState : filterReducer ,
86
87
} ) ;
87
88
88
- const store = createStore ( rootReducer ) ;
89
+ const logger = createLogger ( ) ;
90
+
91
+ const store = createStore (
92
+ rootReducer ,
93
+ undefined ,
94
+ applyMiddleware ( logger )
95
+ ) ;
89
96
90
97
// components
91
98
You can’t perform that action at this time.
0 commit comments