title: React native typeScript and forwardRef in a functional component
body: <p>I'm in react native app an I use typeScript too.
  I have a functional component :</p>
  <pre><code>const Input: React.FunctionComponent&lt;IInputProps&gt; = ({
    inputStyle,
    placeHolderColor = EAppColors.DARK_GREY,
    placeHolder,
    value,
    onChangeText,
    autoFocus,
    onFocus,
    onBlur,
    onSubmitEditing,
    ref,
    keyboardType = EKeyboardType.DEFAULT,
  }) =&gt; {
    return (
      &lt;StyledInput
        testID=&quot;TextInputID&quot;
        placeholderTextColor={placeHolderColor}
        placeholder={placeHolder}
      ...  
  </code></pre>
  <p>I create some ref for different input before my render:</p>
  <pre><code>const firstNameRef = React.createRef&lt;TextInput&gt;();
      const lastNameRef = React.createRef&lt;TextInput&gt;();
      const birthDateRef = React.createRef&lt;TextInput&gt;();
  </code></pre>
  <p>and I use after this component in a class like that :</p>
  <pre><code>&lt;StyledTextInput
                  label={I18n.t('auth.heading.firstNameLabel')}
                  errorText={errorText}
                  ref={firstNameRef}
                  autoFocus={true}
                  placeHolder={I18n.t('auth.placeHolder.firstName')}
                  isFocused={focusOnFirstFields}
                  hasError={hasError}
                  onFocus={() =&gt; this.setState({ focusOnFirstFields: true })}
                  onBlur={() =&gt; this.setState({ focusOnFirstFields: false })}
                  showClearButton={showFirstClearButton}
                  value={firstName}
                  onClearText={() =&gt; this.onClearText(1)}
                  onChangeText={(value: string) =&gt;
                    this.setState({
                      firstName: value,
                      disabled: false,
                      showFirstClearButton: true,
                    })
                  }
                  onSubmitEditing={() =&gt; {
                 if (lastNameRef !== null &amp;&amp; lastNameRef.current !== null) {
                       lastNameRef.current.focus();
                    }
                  }}
                  keyboardType={EKeyboardType.DEFAULT}
                /&gt;
  </code></pre>
  <p>But when I want to use  <strong>onSubmitEditing</strong> for focus the next input, I have this error :
  <a href="https://i.stack.imgur.com/NRpWN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NRpWN.png" alt="enter image description here" /></a></p>
  <p>How can I resolve this issue ?
  Thank You!</p>