title: How do you set the Typescript type for useRef hook in React Native?
body: <p>How do I correctly type the useRef for a React Native TextInput?<br>
  With the below code I get the following error.</p>
  
  <blockquote>
    <p><code>Property 'isFocused' does not exist on type 'MutableRefObject&lt;TextInput&gt;'</code></p>
  </blockquote>
  
  <pre class="lang-js prettyprint-override"><code>import React, { useRef } from 'react';
  import { TextInput } from 'react-native';
  
  const TestScreen = () =&gt; {
  
    const searchInputRef = useRef&lt;TextInput&gt;();
  
    const updateSearchText = (searchText: string) =&gt; {
      console.log(searchTextRef.isFocused()); //   Error here.
    };
  
    return (
      &lt;TextInput
        ref={searchInputRef}
        placeholder="Search"
        onChangeText={(text: string) =&gt; updateSearchText(text)}
        autoCorrect={false}
        autoCapitalize="none"
        value={searchText}
      /&gt;
    )
  
  }
  </code></pre>