title: Equivalent to Dimension from react-native in react
body: <p>Is there an equivalent to Dimension library from react-native in react js for finding the width of the screenspace? If not how could I go about this?</p>
  
  <p>I am trying to find the width of the current webpage so that I can scale my components accordingly, and show/hide certain components depending on the width. An example of the react native code I am trying to use is:</p>
  
  <pre><code>{(Dimensions.get('window').width &lt; filterBoxViewWidth) &amp;&amp; &lt;div&gt; .. &lt;/div&gt;}
  </code></pre>
  
  <p>or:</p>
  
  <pre><code>(Dimensions.get('window').width &gt;= filterBoxViewWidth) ? 200 : 0
  </code></pre>
  
  <p>If there is not an equivalent package that I could use, would you please be able to point me in the right direction for how to do this otherwise. </p>
  
  <p>Thanks.</p>