no message
This commit is contained in:
@@ -11,8 +11,8 @@ export default class Count extends Component{
|
||||
this.props.jia(value*1)
|
||||
}
|
||||
decreement=()=>{
|
||||
// const {value}=this.selectNumber
|
||||
// const {count}=this.state
|
||||
const {value}=this.selectNumber
|
||||
this.props.jian(value*1)
|
||||
}
|
||||
increementOdd=()=>{
|
||||
// const {value}=this.selectNumber
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import countUI from '../../components/count'
|
||||
import {connect} from 'react-redux'
|
||||
import {createIncreementAction} from '../../redux/count_action'
|
||||
import {createIncreementAction,createDecreementAction} from '../../redux/count_action'
|
||||
|
||||
function mapStateToProps(state){
|
||||
return {state}
|
||||
}
|
||||
function mapDispatchToProps(dispatch){
|
||||
return {
|
||||
jia:data=>dispatch(createIncreementAction(data))
|
||||
jia:data=>dispatch(createIncreementAction(data)),
|
||||
jian:data=>dispatch(createDecreementAction(data))
|
||||
}
|
||||
}
|
||||
const CountContainer=connect(mapStateToProps,mapDispatchToProps)(countUI)
|
||||
|
||||
Reference in New Issue
Block a user