看有的代码这么写,还能运行,生命周期钩子加async,不太理解这种行为,不说componentWillMount是同步的,在render前面执行,这样不会阻塞吗?
class Edit extends Component{ constructor(){ } async componentWillMount(){ await someMethod(); } render(){ } }
相关分类