1、React在ES6的实现中去掉了getInitialState这个hook函数,规定state在constructor中实现,如下: Class App extends React.Component { constructor(props) { super(props); this.state = {}; } ... } 2、Babel的Blog上还有一种实现方法,