Created
February 8, 2017 20:09
-
-
Save paulsturgess/dc495342470f006a6c60a97d29584456 to your computer and use it in GitHub Desktop.
An example mapDispatchToProps when using redux-thunk middleware
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 mapDispatchToProps = (dispatch, ownProps) => ({ | |
saveResource: (resource, event) => { | |
Actions.saveResource(resource)(dispatch); | |
}, | |
toggleSomething: (id, event) => { | |
dispatch(Actions.toggleSomething(id)); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment