title: How can I use React hooks in React classic `class` component?
body: <p>In this example, I have this react class:</p>
  
  <pre><code>class MyDiv extends React.component
     constructor(){
        this.state={sampleState:'hello world'}
     }
     render(){
        return &lt;div&gt;{this.state.sampleState}
     }
  }
  </code></pre>
  
  <p>The question is if I can add React hooks to this. I understand that React-Hooks is alternative to React Class style. But if I wish to slowly migrate into React hooks, can I add useful hooks into Classes?</p>