Created
May 15, 2020 15:02
-
-
Save georg3103/ea9e44c874859fe7d83f1d37d21d9617 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 thunk = (store) => (next) => (action) => { | |
if (typeof action === 'function') { | |
return action(store.dispatch) | |
} | |
return next(action) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment