会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
YooHoeh
爱码士。
首页
新随笔
联系
管理
2018年9月25日
setState()之后使用state的问题
摘要: 一开始知道setState()是异步执行方法,在使用这个方法改变state之后直接用this.state获取的state不是更新之后的,只有render发生变化的时候才触发this.setState()。 constructor(props) { s...
阅读全文
posted @ 2018-09-25 12:39 YooHoeh
阅读(657)
评论(0)
推荐(0)
编辑
公告
被你发现了?