title: in a react component, how to get `this` in static function?
body: <p>attempting to create a <code>static</code> function within a react component. the function uses <code>this</code> to get its data, but <code>this</code> is out of scope when the function is called.</p>
  
  <p>here is a very simple example:</p>
  
  <pre>
  var Test = React.createClass({
    val: 5,
    statics: {
      getVal: function() { return this.val }
    },
    render: return( &lt;div&gt;{this.val}&lt;/div&gt; )
  });
  
  Test.getVal(); =&gt; undefined!!
  </pre>
  
  <p>obviously <code>this</code> has lost its scope when <code>Test.getVal()</code> is called. how to get <code>this</code> inside the <code>getVal()</code> function?</p>
  
  <p>fyi, the following standard javascript parent approach does not work:</p>
  
  <pre>
  Test.getVal.apply( Test ); =&gt; undefined
  </pre>