摘要: 一开始知道setState()是异步执行方法,在使用这个方法改变state之后直接用this.state获取的state不是更新之后的,只有render发生变化的时候才触发this.setState()。 constructor(props) { s... 阅读全文
posted @ 2018-09-25 12:39 YooHoeh 阅读(657) 评论(0) 推荐(0) 编辑
被你发现了?