title: How to get image height and width from uri on React Native?
body: <p>So, I tried to use function that provided by React Native which is Image.getSize. But when I try to use height and width outside the function it appears to be nil.
  Here is my code:</p>
  
  <pre><code>var theHeight = 0;
  Image.getSize(url,(height, width)=&gt;{
   theHeight = height;
  })
  
  console.log("test get height "+theHeight);
  </code></pre>
  
  <p>and the result would be</p>
  
  <blockquote>
    <p>test get height 0</p>
  </blockquote>
  
  <p>What did I do wrong?</p>