title: SafeAreaView measure function not working in react native
body: <p>my problem is that I have to measure <code>View</code> using the basic <code>measure</code> function. However, if <code>SafeArea</code> uses that function, it will not work.</p>
  
  <pre class="lang-js prettyprint-override"><code>const headerRef = useRef(null);
  ...
    useEffect(() =&gt; {
      headerRef.current.measure( (ox, oy, width, height, px, py) =&gt; {
      set({
        ox: ox,
        oy: oy,
        width: width,
        height: height,
        px: px,
        py: py,
      });
    };);
    }, []);
  ...
  &lt;SafeAreaView style={styles.safeArea} ref={headerRef}&gt;
  
  </code></pre>
  
  <p><strong>Error is</strong> </p>
  
  <pre><code>TypeError : Cannot read property 'measure' of undefined
  </code></pre>
  
  <p>How can you solve this problem?</p>
  
  <p>Is there anyone who has the same problem as me?</p>