title: How to create type when using createRef for Animated.View in TypeScript
body: <p>When creating a ref in a React Native component, Typescript complains about it if you don't provide the right type.</p>
  
  <pre><code>image = React.createRef();
  
  state = {
      x: new Animated.Value(0),
      y: new Animated.Value(0),
  };
  
  render() {
      const {x, y} = this.state;
      const imageStyle = {left: x, top: y};
  
      return (
          &lt;Animated.View
              ref={this.image} // I got warning message here
              {...this.responder}
              style={[styles.draggable, imageStyle]}&gt;
              {this.props.children}
          &lt;/Animated.View&gt;
      )
  }
  
  const styles = StyleSheet.create({
      draggable: {
      position: 'absolute',
      height: itemWidth,
      width: itemWidth,
      },  
  });
  </code></pre>
  
  <p>I got this warning </p>
  
  <blockquote>
    <p>Type '{ children: ReactNode; style: ({ left: Value; top: Value; } | {
    position: "absolute"; height: number; width: number; })[]; current:
    unknown; ref: RefObject; }' is not assignable to type
    'IntrinsicAttributes &amp; AnimatedProps &amp; { children?:
    ReactNode; }'.   Property 'ref' does not exist on type
    'IntrinsicAttributes &amp; AnimatedProps &amp; { children?:
    ReactNode; }'</p>
  </blockquote>
  
  <p><code>createRef</code> line needs to be something like 
  <code>image = React.createRef&lt;some_type&gt;();</code>
  But I don't know how to create this <code>some_type</code> </p>