爲什麼你需要在下面的例子中有超級?它真的從React.Component中獲取它需要對道具做什麼?爲什麼超級必要如果你已經將CommentList從React.Component中擴展出來 - 是不是傳入構造函數的道具已經被傳遞給了React.Component?使用超級擴展React.Component的目的是什麼?
class CommentList extends React.Component {
constructor(props) {
super(props);
this.state = { comments: [] }
} ...
}