Last active
May 27, 2019 12:09
-
-
Save GergKllai1/66e5d0c0cf4cb5f262f7172f57e478bc 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
const logger = state => { | |
return next => { | |
return action => { | |
console.log("Previous state:"); | |
console.log(state.getState()); | |
console.log("Dispatching action:"); | |
console.log(action); | |
const result = next(action); | |
console.log("Next state:"); | |
console.log(state.getState()); | |
return result; | |
}; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment