VP
Size: a a a
VP
VP
IA
TS
М
М
S
S
S
S
М
R
D
handleChangePoss(){
this.setState(state=>({poss:state.poss + 1}))
}
handleChangePossBack(){
alert(12)
}
render(){
console.log(this.state.poss)
const number = this.state.number;
const poss = this.state.poss;
let had;
if(poss == 3){
had = this.handleChangePossBack
}else{
had = this.handleChangePoss
}
D
handleChangePoss(){
this.setState(state=>({poss:state.poss + 1}))
}
handleChangePossBack(){
alert(12)
}
render(){
console.log(this.state.poss)
const number = this.state.number;
const poss = this.state.poss;
let had;
if(poss == 3){
had = this.handleChangePossBack
}else{
had = this.handleChangePoss
}
constructor(props){
super(props);
this.handleChangeNumber =
this.handleChangeNumber.bind(this);
this.handleChangePoss = this.handleChangePoss.bind(this);
this.handleChangePossBack = this.handleChangePoss.bind(this);
this.state={number:"",poss:0}
}
DM
handleChangePoss(){
this.setState(state=>({poss:state.poss + 1}))
}
handleChangePossBack(){
alert(12)
}
render(){
console.log(this.state.poss)
const number = this.state.number;
const poss = this.state.poss;
let had;
if(poss == 3){
had = this.handleChangePossBack
}else{
had = this.handleChangePoss
}
D
DM