title: how to show width and height of image in react native
body: <p>how Can I show width and height of an image , I use this syntax :</p>
  
  <pre><code>const width = Image.getSize(imag, (width, height)=&gt;JSON.stringify(width));
  </code></pre>
  
  <p>now if I <code>alert({width})</code>  it shows object Object but if I put alert within getSize function it display the value like this :</p>
  
  <pre><code>Image.getSize(imag, (width, height)=&gt;{alert(JSON.stringify(width))});
  </code></pre>
  
  <p>I want to store the value in a variable like in my first example and then get access to it , this is a function component , no setState, could you please help</p>