Created
October 21, 2016 07:49
-
-
Save olegkalyta/c1fe87b6d023fa49115bbbf914ca0163 to your computer and use it in GitHub Desktop.
Ask Dan
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 patchStoreToAddLogging(store) { | |
let next = store.dispatch | |
store.dispatch = function dispatchAndLog(action) { | |
console.log('dispatching', action) | |
let result = next(action) | |
console.log('next state', store.getState()) | |
return result | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment