Last active
October 15, 2015 20:49
-
-
Save jlongster/d872962837e2d945fd6f 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
function taskMiddleware({ dispatch, getState }) { | |
return next => action => { | |
if(isGenerator(action)) { | |
// Not sure how to pass args via Task.spawn, can you do | |
// something like this? | |
return Task.spawn(action, dispatch, getState); | |
} | |
return next(action); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment