× ReferenceError:在访问“this”或从派生构造函数返回之前,必须在派生类中调用超级构造函数

时间:2021-07-31 20:47:38

标签: reactjs react-native constructor referenceerror

我刚开始反应。当我运行项目时,我收到此错误? 如果我应该提供有关我的问题的更多详细信息,请告诉我。

How should I solve this?

1 个答案:

答案 0 :(得分:1)

哦,我明白了。 试试这个,它应该适合你。

  constructor (props){
    super(props)
    this.state = {
      students: []
    }
  }
相关问题