title: Using async and await in react render
body: <p>I was trying to capture the hight of status bar in react native.</p>
  
  <p>For which I wrote the following code </p>
  
  <pre><code>render() {
      let StatusBarHeight = null
     if (Platform.OS === 'ios') {
       StatusBarHeight = StatusBarManager.getHeight((statusBarHeight)=&gt;{
                  console.log(statusBarHeight)
                  return statusBarHeight
              })
       console.log(`This is the height of the status bar in iOS:`,StatusBarHeight)
      }
  }
  </code></pre>
  
  <p>Here, the <code>console.log(statusBarHeight)</code> is coming out to be <code>{height: 44}</code> which I intended to store in <code>StatusBarHeight</code> but my second console.log afterwards is giving me undefined </p>
  
  <pre><code>console.log(`This is the height of the status bar in iOS:`,StatusBarHeight)
  </code></pre>
  
  <p>Which makes me think that <code>StatusBarManager.getHeigh(</code> is <code>async</code> function. So, Can someone help me figure height how can we use async-await in render of react-native</p>