Last active
March 13, 2020 11:24
-
-
Save Djuki/f2bc8a7ab7ab4463b8f96b2201f4bc4a to your computer and use it in GitHub Desktop.
Mapping redux state and actions to the component
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 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