// 引入math(ui组件)import MathUI from '../../components/Math'import{ createIncrement,createDecrement, createAsyncIncrement} from '../../redux/count_redux/count_action'//引入store// import store from '../../redux/count_redux/store'//引入connect用于连接ui组件和reduximport {connect} from 'react-redux'//高阶函数,连接ui组件//使用connect创建并暴露一个math组件//connect第一个函数是映射ui组件和容器组件的关系,第二个组件是连接ui组件和容器组件export default connect( state=>({ count:state }) //在react-redux中可以将action自动dispatch给redux, //如果两个参数都是函数,第二个参数可以写成一个对象 ,{ jia:createIncrement, jian:createDecrement, jiaAsync:createAsyncIncrement})(MathUI)