const thunk = (store) => (next) => (action) => {
if (typeof action === "function") {
return action(store.dispatch);
}
return next(action);
};
Created
May 2, 2020 13:52
-
-
Save mojaray2k/3971491767579b822208004c54dacafc to your computer and use it in GitHub Desktop.
Custom Thunk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment