title: How to implement lifecycle methods in functional components in React?
body: <p>For a simple component written like this:</p>
  
  <pre><code>import React from 'react'
  
  const MyComponent = ({text}) =&gt; {
      return(&lt;div&gt; {text} &lt;/div&gt;
  }
  </code></pre>
  
  <p>Is there a syntax for implementing lifecycle method like componentDidMount() or do I have to convert code to React.Component class?</p>