title: How do I set a ref when using react.createElement?
body: <p>I want to get a ref to the component represented by the element i create, but cannot get it to work. I tried this:</p>
  
  <pre><code>            var comp = React.createElement(
                  MyComp,
                  {
                      props: myprops,
                      ref: "mycomp"
                  }
              );
  </code></pre>
  
  <p>But this doesn't work. How do i set a ref on it so the parent can call <code>this.refs.mycomp.someMethod()</code>?</p>