Created
October 31, 2016 21:35
-
-
Save naomiajacobs/3f288c1a5f5ac61b0f978facb851c2df to your computer and use it in GitHub Desktop.
LoggerMiddleware
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
const logger = store => next => action => { | |
console.log('Action: ', action); | |
console.log('Next state: ', store.getState()); | |
return next(action); | |
}; | |
// const logger = function(store) { | |
// return function(next) { | |
// return function(action) { | |
// console.log('Action: ', action); | |
// console.log('Next state: ', store.getState()); | |
// return next(action); | |
// }; | |
// }; | |
// }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment