Last active
June 28, 2016 16:48
-
-
Save viniciusdacal/7d50b0d1c1f20cb9239bfcb45e59952a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function logger(store) { | |
const { dispatch, getState } = store; | |
return next => action => { | |
console.group(action.type); | |
console.info('dispatching', action); | |
let result = next(action); | |
console.log('next state', getState()); | |
console.groupEnd(action.type); | |
return result; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment