Skip to content

Instantly share code, notes, and snippets.

@beaucollins
Last active January 8, 2019 20:57
Show Gist options
  • Select an option

  • Save beaucollins/2df58bb0cc7bdb612d8815225603710c to your computer and use it in GitHub Desktop.

Select an option

Save beaucollins/2df58bb0cc7bdb612d8815225603710c to your computer and use it in GitHub Desktop.
const middleware: AppMiddleware = store => next => action => {
const usersCreate = isProjectsCreate(action);
if (usersCreate !== null) {
// do something with usersCreate
createProjectHTTP(usersCreate, store.getState()).then(store.dispatch);
}
return next(action);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment