title: Material-UI - alternative of withWidth() for class component
body: <p>The documentation says:</p>
  
  <blockquote>
    <p>This higher-order component will be deprecated for the useMediaQuery hook.</p>
  </blockquote>
  
  <p>I have a class component which means can't use <strong>useMediaQuery hook</strong>.</p>
  
  <p>example code:</p>
  
  <p><a href="https://codesandbox.io/s/material-demo-0kz88" rel="nofollow noreferrer">https://codesandbox.io/s/material-demo-0kz88</a></p>
  
  <p>What is the alternative then?</p>