title: React Native status bar event for dimensions in 0.62.x
body: <p>StatusBarIOS has a method <code>addListener</code> which allows us to listen for changes to the status bar height, like so:</p>
  
  <pre class="lang-js prettyprint-override"><code>StatusBarIOS.addListener('statusBarFrameWillChange', (statusBarData) =&gt; {
    this.setState({statusBarHeight: statusBarData.frame.height});
  });
  </code></pre>
  
  <p>StatusBarIOS is deprecated, with a message that the code has been merged into StatusBar</p>
  
  <p><a href="https://i.stack.imgur.com/dpggb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dpggb.png" alt="enter image description here"></a></p>
  
  <p>How can we listen for the <code>statusBarFrameWillChange</code> event?</p>