Skip to content

Instantly share code, notes, and snippets.

@anosikeosifo
Created January 21, 2018 16:34
Show Gist options
  • Save anosikeosifo/e8f49452a4f5db4f4eae12542e0cad5f to your computer and use it in GitHub Desktop.
Save anosikeosifo/e8f49452a4f5db4f4eae12542e0cad5f to your computer and use it in GitHub Desktop.
import { connect } from "react-redux";
import { bindActionCreators } from "redux";
import Explore from "../components/explore"; //imports the feature's entry component.
import { navigateToLogin } from "navigation/actions"; //imports navigation action to be used by feature
import { getExploreData } from "../actions"; // imports action creators as needed.
import { getCategoryListing } from "../selectors"; // imports selectors as needed.
const mapStateToProps = state => ({
exploreData: state.exploreData,
categoryListing: getCategoryListing(state)
});
const mapDispatchToProps = dispatch =>
bindActionCreators(
{
getExploreData
},
dispatch
);
// Connects the entry-component and makes it the default export.
export default connect(mapStateToProps, mapDispatchToProps)(Explore);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment