看有的代码这么写,还能运行,生命周期钩子加async,不太理解这种行为,不说componentWillMount是同步的,在render前面执行,这样不会阻塞吗?class Edit extends Component{ constructor(){
} async componentWillMount(){ await someMethod();
}
render(){
}
}
1 回答
- 1 回答
- 0 关注
- 1285 浏览
添加回答
举报
0/150
提交
取消