setState是异步方法

2020/10/10 4:42:44reactframework
this.setState({
		name: 'test'
}, () => {
		console.log(this.state.name)
})