title: react native focus next input with InputAccessoryView
body: <p>I am using InputAccessoryView to create a button above the nonnumeric/default keyboard. The issue I am facing is when I press the input accessory button to move focus to the next input, I am getting an error of you can't access &quot;.current of ref&quot;.</p>
  <p>I would like to move to the next input by using the input accessory button and not the onSubmitEditing. code is as follows:</p>
  <pre class="lang-js prettyprint-override"><code>const Signup = () =&gt; {
    const inputAccessoryViewID = 'uniqueIDdddd';
    const inputRefs = [React.createRef(), React.createRef(), React.createRef()];
  
    const goToNextInput = index =&gt; {
      inputRefs[index + 1].current.focus();
    };
  
    return (
      &lt;&gt;
        &lt;ScrollView
          keyboardShouldPersistTaps=&quot;handled&quot;
          keyboardDismissMode=&quot;interactive&quot;
        &gt;
          {inputRefs.map((k, idx) =&gt; (
            &lt;&gt;
              &lt;TextInput
                onChangeText={setText}
                value={text}
                inputAccessoryViewID={inputAccessoryViewID}
                style={{ height: 40, width: 200, margin: 12, borderWidth: 1 }}
                ref={inputRefs[idx]}
              /&gt;
              &lt;InputAccessoryView nativeID={inputAccessoryViewID}&gt;
                /** Press this button to move to the next input */
                &lt;Button onPress={() =&gt; goToNextInput(idx)} title=&quot;Next&quot; /&gt;
              &lt;/InputAccessoryView&gt;
            &lt;/&gt;
          ))}
        &lt;/ScrollView&gt;
      &lt;/&gt;
    );
  };
  </code></pre>