在componentDidMount做回调处理的规范问题

#1

如下组件代码:

class Demo extends React.Component {
  constructor(props) {
    ...
  }
  async componentDidMount(){
    await actions.doingSomething(query);
    doingOthers();
    ....
  }
}

换句话说,async…await 用在componentDidMount周期符合规范吗?

#2

别沉… :cry:

#3

可以的 why not

#4

好的,多谢

#5

可以的!!!!!