摘要:
React中的setState既是同步也是异步 同步: 验证一:在setTimeout中的更新 changText(){ setTimeout(()=>{ this.setState({ increment:'你好啊,lpx' }) console.log(this.state.increment) 阅读全文
posted @ 2022-01-08 21:04
无何不可88
阅读(50)
评论(0)
推荐(0)
摘要:
父组件的代码展示 class App extends React.Component{ constructor(props){ super(props); this.state={ name:['流行','新款','精选'], //这些数据为tab栏展示的数据 currentTitle:'流行' } 阅读全文
posted @ 2022-01-08 17:58
无何不可88
阅读(413)
评论(0)
推荐(0)

浙公网安备 33010602011771号