Skip to content

Instantly share code, notes, and snippets.

@Djuki
Last active March 13, 2020 11:24
Show Gist options
  • Save Djuki/f2bc8a7ab7ab4463b8f96b2201f4bc4a to your computer and use it in GitHub Desktop.
Save Djuki/f2bc8a7ab7ab4463b8f96b2201f4bc4a to your computer and use it in GitHub Desktop.
Mapping redux state and actions to the component
const mapStateToProps = state => ({ branchesNextPage: state.repositories.branchesNextPage });
const mapDispatchToProps = dispatch => ({
fetchMoreBranches: (id, nextPage) => dispatch(fetchMoreBranches(id, nextPage))
});
const AppContainer = connect(mapStateToProps, mapDispatchToProps)(App);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment