title: Using createRef in react-native with typescript?
body: <p>I am trying to figure out how I need to use <code>React.createRef()</code> in react native with typescript as following code throws errors</p>
  
  <pre><code> // ...
  
    circleRef = React.createRef();
  
    componentDidMount() {
      this.circleRef.current.setNativeProps({
        someProperty: someValue
      });
    }
  
    // ...
  </code></pre>
  
  <p>Currently following errors are thrown for <code>this.circleRef.current.setNativeprops</code></p>
  
  <blockquote>
    <p>[ts] Object is possibly 'null'. (property)
    React.RefObject&lt;{}>.current: {} | null</p>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
    <p>[ts] Property 'setNativeProps' does not exist on type '{}'. any</p>
  </blockquote>
  
  <p>any ideas?</p>