Xử lý State
class AddReaction extends PureComponent {
constructor(props) {
super(props);
this.state={
count:0
};
};
updateCount=(newCount)=>{
this.setState({count:newCount});
};
render(){
return(
<ChildComponent count={this.updateCount}/>
)
}
}Last updated