, .
, , . .
function logger(store) {
let next = store.dispatch
return function dispatchAndLog(action) {
console.log('dispatching', action)
let result = next(action)
console.log('next state', store.getState())
return result
}
}
store.dispatch = logger(store)
, store logger. logger next store.dispatch. , . next(action) result result.
, store.dispatch, , , .
? , , : ( ) store.dispatch