看有的代碼這么寫,還能運行,生命周期鉤子加async,不太理解這種行為,不說componentWillMount是同步的,在render前面執行,這樣不會阻塞嗎?class Edit extends Component{ constructor(){
} async componentWillMount(){ await someMethod();
}
render(){
}
}
- 1 回答
- 0 關注
- 1306 瀏覽
添加回答
舉報
0/150
提交
取消