Skip to content

Instantly share code, notes, and snippets.

@aurels
Created May 22, 2017 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aurels/8553e771fb4f1d6ce94f254e414122f4 to your computer and use it in GitHub Desktop.
Save aurels/8553e771fb4f1d6ce94f254e414122f4 to your computer and use it in GitHub Desktop.
mapDispatchToProps
const mapDispatchToProps = {
setCurrentTab: albumActions.setCurrentTab
}
const mapDispatchToProps = (dispatch) => {
return {
setCurrentTab: (tab) => {
dispatch(albumActions.setCurrentTab(tab))
}
}
}
const mapDispatchToProps = (dispatch) => {
return bindActionCreators({
setCurrentTab: albumActions.setCurrentTab,
setCurrentTab2: (tab) => {
return albumActions.setCurrentTab(tab)
}
}, dispatch)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment