Skip to content

Instantly share code, notes, and snippets.

@santiagopoli
Last active April 30, 2017 20:54
Show Gist options
  • Select an option

  • Save santiagopoli/0291572355e151475b55fc327dbf7581 to your computer and use it in GitHub Desktop.

Select an option

Save santiagopoli/0291572355e151475b55fc327dbf7581 to your computer and use it in GitHub Desktop.
const mapDispatchToProps = (dispatch, props) => ({
onSelectFavorite: (favorite) => {
props.onSelectFavorite(favorite);
dispatch(fetchFavoriteInfo(favorite.id));
}
})
const mapStateToProps = (state) => ({
favorites: state.favorites
})
export default connect(mapStateToProps, mapDispatchToProps)(FavoritesView)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment