title: .measure is not a function
body: <p>I want to determine the position of my element from top of the screen. From other questions, one way to do is by using .measure property of react native? </p>
  
  <p>Ref Question: <a href="https://stackoverflow.com/questions/30096038/react-native-getting-the-position-of-an-element">React Native: Getting the position of an element</a></p>
  
  <p>So I did something like this</p>
  
  <pre><code>const AutoComplete = (props) =&gt; {
    let parentViewRef =  useRef(null);
    return (
         &lt;View 
          style={styles.modelOpenViewMain}&gt;
          &lt;View  ref={parentViewRef} 
          onLayout={({nativeEvent}) =&gt; {
            console.log(nativeEvent)
            if (parentViewRef) {
              parentViewRef.measure((x, y, width, height, pageX, pageY) =&gt; {
                        console.log(x, y, width, height, pageX, pageY);
               })
              }}}/&gt;
          &lt;View style={styles.modelOpenInputView}&gt;
            &lt;TextInput
                value={value.label}
                onChangeText={(text) =&gt; onchangeHandler(text)}
                style={[{color: defaultColor, borderColor: defaultColor}, styles.defaultTextInputStyle, textInputStyle]}
              /&gt;
            &lt;/View&gt;
        &lt;/View&gt;
  )
  }
  </code></pre>
  
  <p>console for my parentViewRef is giving me this <code>console.log(parentViewRef)</code></p>
  
  <pre><code>_nativeTag: 73
  _children: []
  viewConfig:
  uiViewClassName: "RCTView"
  Commands: {}
  bubblingEventTypes: {topSelect: {…}, topBlur: {…}, topChange: {…}, topEndEditing: {…}, topFocus: {…}, …}
  directEventTypes: {topClick: {…}, topContentSizeChange: {…}, topLoadingError: {…}, topLoadingFinish: {…}, topLoadingStart: {…}, …}
  validAttributes: {hasTVPreferredFocus: true, focusable: true, nativeBackgroundAndroid: true, nativeForeg 
  </code></pre>
  
  <p>And there isn't any function measure in there, Can someone help me in figuring out what I am doing wrong? </p>
  
  <p>Just in case: I am logging my parentViewRef after 3 seconds </p>
  
  <pre><code>setTimeout(() =&gt; {
    console.log(parentViewRef)
   }, 3000);
  </code></pre>