title: Passing refs on React Native with TypeScript: (property) React.MutableRefObject<null>.current: null Object is possibly 'null'.ts(2531)
body: <p>I have several fields on a React Native form and I would like that the focus jump from one to the next one each time the user validate the field with the virtual keyboard.</p>
  <p>I came up with something like that:</p>
  <pre><code>        &lt;NamedTextInput
            name={'email'}
            ref={emailRef}
            ...
            onSubmitEditing={() =&gt; passwordRef.current.focus()}
          /&gt;
          
          &lt;NamedTextInput
            name={'password'}
            ref={passwordRef}
            ...
          /&gt;
  </code></pre>
  <p>On current I get a TypeScript error:</p>
  <pre><code>(property) React.MutableRefObject&lt;null&gt;.current: null
  Object is possibly 'null'.ts(2531)
  </code></pre>
  <p>I tried to add ! and ? marks but it ends into:</p>
  <pre><code>Property 'focus' does not exist on type 'never'.ts(2339)
  </code></pre>
  <p>Any idea to solve this ?</p>
  <p>Thanks</p>