title: how to use setProps in react.js
body: <p>I want to call <code>setProps</code> from outside of <code>myComponent</code> to be able to dynamically change data for <code>myComponent</code>.<br>
  I expect that after changing props of the component, it will re-render itself.   </p>
  
  <p>I was trying the following:</p>
  
  <pre class="lang-jsx prettyprint-override"><code>var myComponent = React.createClass({
    render: function () {
      return (
        React.DOM.div(null, this.props.data)
      );
    }
  });
  
  React.renderComponent(
    myComponent({ data: someData }),
    document.getElementById('predictionContent')
  );
  
  myComponent.setProps({data: someData2});
  </code></pre>
  
  <p>The problem is that I don't understand how to use <code>setProps</code> for the component.
  In my case, I receive "undefined" error.</p>
  
  <p>How to solve this?</p>