title: Material-UI Error: Object is not a function within makeStyles?
body: <p>The error:</p>
  <pre class="lang-sh prettyprint-override"><code>TypeError: Object(...) is not a function
    13 | import { connect } from 'react-redux';
    14 | 
    15 | 
  &gt; 16 | const useStyles = makeStyles(theme =&gt; ({
    17 |     ...theme
    18 | }));
    19 | 
  </code></pre>
  <p>Code:</p>
  <pre class="lang-js prettyprint-override"><code>const useStyles = makeStyles(theme =&gt; ({
      ...theme
  }));
  </code></pre>
  <p><strong>Why do I get the above error?</strong><br/>
  Everything was working but suddenly i got that error, may be after i updated npm <code>npm -g update</code> but i am not sure.</p>
  <p>Can someone help out?</p>
  <p>Edit: this is how i am using useStyles:</p>
  <pre><code>const classes = useStyles();
  </code></pre>
  <p>then i am using the classes to style my elements like this:</p>
  <pre><code>&lt;Button className={classes.button} /&gt;
  </code></pre>
  <p><code>classes.button</code> get the button rule from the global theme and use it to style the button</p>