我正在扩展基类并覆盖基类中的方法。但是当我调用它时,它调用的是超类版本。如何覆盖该方法?
    var Hello = React.createClass( {
        getName: function() { return "super" },
        render: function() {
            return <div>This is: {this.getName()}</div>;
        }
    });
    class HelloChild extends Hello {
        constructor(props) {
          super(props);
          console.log( this.getName());
        }
        getName()
        {
          return "Child";
        }
    };
我希望它打印“这是:孩子”,但它会打印“这是:超级”