title: window.innerWidth in real time
body: <p>I'm in need of getting the width of the browser when i resize the browser in real time. So far i've found a solution which gives the width but it's not in real time. The value is updated only after i refresh the web page. How can i get the value as i resize the browser.</p>
  
  <p>My approach</p>
  
  <pre><code>render() {
  
  var windowWidth = window.innerWidth;
  
  return (
  
        &lt;div className="body_clr"&gt;
  
          {windowWidth}
  
        &lt;/div&gt;
  
  )
  }
  </code></pre>
  
  <p>This solution works if i refresh the page. But i want to get the width as i resize because i have to execute a function at a specific screen size. </p>