title: How to use lifecycle methods with hooks in React?
body: <p>I have gone through hooks introduced in react v16.7.0. </p>
  
  <p><a href="https://reactjs.org/docs/hooks-intro.html" rel="noreferrer">https://reactjs.org/docs/hooks-intro.html</a></p>
  
  <p>So my understanding about hooks is we can play with state in functional component without writing class components in react. This is really amazing feature.</p>
  
  <p>But I am not getting clear picture about using hooks in functional components. </p>
  
  <pre><code>   import { useState } from 'react';
  
     function Example() {
     const [count, setCount] = useState(0);
  
      return (
        &lt;div&gt;
          &lt;p&gt;You clicked {count} times&lt;/p&gt;
          &lt;button onClick={() =&gt; setCount(count + 1)}&gt;
           Click me
          &lt;/button&gt;
        &lt;/div&gt;
     );
    }
  </code></pre>
  
  <p>how can I use life cycle methods in the above functional component if I use hooks?</p>