Skip to content

Instantly share code, notes, and snippets.

@callmephilip
Created May 18, 2016 16:10
Show Gist options
  • Save callmephilip/661842ccc4c5a8564a28539d38e3fd85 to your computer and use it in GitHub Desktop.
Save callmephilip/661842ccc4c5a8564a28539d38e3fd85 to your computer and use it in GitHub Desktop.
export default connect(mapStateToProps, mapDispatchToProps, (stateProps, dispatchProps, ownProps) => {
return Object.assign({}, ownProps, stateProps, dispatchProps, {
onNavigate: (action) => {
dispatchProps.dispatch(Object.assign(action, {
scope: action.scope || stateProps.navigation.key
}));
}
});
})(Feed);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment