title: React + ES6: defaultProps of hierarchy
body: <p>Due I refactor my code to ES6, I move all defaults to <code>SomeClass.defaultProps = { ... }</code>. </p>
  
  <p>Suppose a situation, when there is a class hierarchy, and I need to keep some defaults to whole hierarchy. But the <strong><em>problem</em></strong> is that <code>defaultProps</code> not work for classes that are extended:</p>
  
  <pre><code>class AbstractComponent extends React.Component {
    constructor(props) { super(props) }
  }
  class OneOfImplementations extends AbstractComponent {
    constructor(props) { super(props) }
  }
  //Problem: hierarchy defaults doesn't work
  AbstractComponent.defaultProps = { name: 'Super' } 
  </code></pre>
  
  <p><a href="http://jsfiddle.net/jwm6k66c/102/" rel="nofollow">Fiddle example</a></p>
  
  <p><strong>P.S.</strong> I'm wondering where is the best place to keep commons (variables/functions) for the whole hierarchy? Maybe do something like this at <code>AbstractComponent</code>:</p>
  
  <pre><code>constructor(props) {
    super(_.assign(props, {
      commonValue: 128,
      commonCallback: _.noop
    }));
  }
  </code></pre>
  
  <p>But the problem is that's become impossible to override one of properties from a subclass</p>