摘要: setState是异步的方式 this.setState({ counter:this.state.counter+1 }) console.log(this.state.counter) setState是异步,执行最后一个setState 同步执行的方法,传递函数 1,this.setState 阅读全文
posted @ 2019-12-02 18:03 focus_yaya 阅读(639) 评论(0) 推荐(0) 编辑