setState回调

this.state = {foo: 2};
this.setState({foo: 123}, ()=> {
 console.log(foo);

});

 

posted @ 2019-11-08 18:36  ThisCall  阅读(812)  评论(0编辑  收藏  举报