this.state = {foo: 2}; this.setState({foo: 123}, ()=> { console.log(foo); });
setState回调
原文:https://www.cnblogs.com/dianzan/p/11822283.html