React Native _this2.refs.myinput.focus is not a function
<p>Using React-Native, I have a custom component which extends from TextInput like so:</p>

<p><strong>TextBox.js</strong></p>

<pre><code>...
render() {
  return (
  &lt;TextInput
    {...this.props}
    style={styles.textBox}/&gt;
  );
}
...
</code></pre>

<p><strong>MyScene.js</strong> (imports TextBox.js)</p>

<pre><code>...
render() {
  render(
    &lt;View&gt;
      &lt;TextBox
        rel='MyFirstInput'
        returnKeyType={'next'}
        onSubmitEditing={(event) =&gt; { this.refs.MySecondInput.focus(); }}/&gt;

      &lt;TextBox
        ref='MySecondInput'/&gt;
    &lt;/View&gt;
  );
}
</code></pre>

<p>When I build the app and press next on the keyboard when focusing on <code>MyFirstInput</code>, I expect <code>MySecondInput</code> to be in focus, instead I get the error:</p>

<pre><code>_this2.refs.MySecondInput.focus is not a function
</code></pre>

<p>What could the error be? Is it something to do with the scope of <code>this</code>? Thanks.</p>