title: How to integrate constants and functions in React Component class?
body: <p>Let's take the AppBar code from Material-UI:
  <a href="https://material-ui.com/components/app-bar/#app-bar-with-a-primary-search-field" rel="nofollow noreferrer">https://material-ui.com/components/app-bar/#app-bar-with-a-primary-search-field</a></p>
  
  <p>There is a "renderMobileMenu". I want to integrate it. The problem is that the sample code uses "function" whereas mine is a React Component class. I need guidance on how to integrate that renderMobileMenu (and relevant) piece of code in a React Component class.
  I am also using React Redux.</p>
  
  <pre><code>export default connect(
      mapStateToProps,
      {wbToggle: wbToggle, vidToggle: vidToggle, fileToggle: fileToggle}
  )(Utilitybar);
  </code></pre>
  
  <p>I have tried but it always gives error that I am breaking laws of hooks.</p>