title: How to override a parent class method in React?
body: <p>I'm extending a base class and overriding a method in the base class. But when I call it, it calls the super class version. How do I override the method?</p>
  
  <pre><code>    var Hello = React.createClass( {
  
          getName: function() { return "super" },
  
          render: function() {
  
              return &lt;div&gt;This is: {this.getName()}&lt;/div&gt;;
          }
      });
  
      class HelloChild extends Hello {
          constructor(props) {
            super(props);
  
            console.log( this.getName());
          }
          getName()
          {
            return "Child";
          }
      };
  </code></pre>
  
  <p>I want it to print "This is: Child" but it prints "This is: super"</p>