import { connect } from "react-redux"; import { SUBCATEGORY_SELECT } from "constants/actionTypes"; const mapStateToProps = state => { return { subcategory: state.subcategory }; }; const mapDispatchToProps = dispatch => ({ onSubCategoryChanged: option => dispatch({ type: SUBCATEGORY_SELECT, option }) }); export const subcategorywrapper = component => connect( mapStateToProps, mapDispatchToProps )(component);