title: Extending React.js components
body: <p>One of the things I appreciate the most about Backbone.js is how simple and elegant inheritance works. I'm starting to get to grips with React, and can't really find anything in react that resembles this Backbone code</p>
  
  <pre><code>var Vehicle = Backbone.View.extend({
      methodA: function() { // ... }
      methodB: function() { // ... }
      methodC: function() { // ... }
  });
  
  var Airplane = Vehicle.extend({
      methodC: function() {
          // Overwrite methodC from super
      }
  });
  </code></pre>
  
  <p>In react we <a href="http://facebook.github.io/react/docs/reusable-components.html#mixins">have mixins</a>, and using those we could get somewhat close to the above example if we went like this</p>
  
  <pre><code>var vehicleMethods = {
      methodA: function() { // ... }
      methodB: function() { // ... }
  }
  
  var Vehicle = React.createClass({
      mixins: [vehicleMethods]
      methodC: function() { 
          // Define method C for vehicle
      }
  });
  
  var Airplane = React.createClass({
      mixins: [vehicleMethods]
      methodC: function() {
          // Define method C again for airplane
      }
  });
  </code></pre>
  
  <p>This is less repetitive than defining the same stuff over and over again, but it doesn't seem to be nearly as flexible as the Backbone way. For instance, I get an error if I try to redefine/overwrite a method that exists in one of my mixins. On top of that, the React.js way is more code for me to write.</p>
  
  <p>There is some incredibly clever stuff in react, and it feels like this is more the case of me not getting how to properly do this, than it feels like a feature missing from React.</p>
  
  <p>Any pointers are greatly appreciated.</p>