title: ReactJS lifecycle method inside a function Component
body: <p>Instead of writing my components inside a class, I'd like to use the function syntax.</p>
  <p>How do I override <code>componentDidMount</code>, <code>componentWillMount</code> inside function components?<br />
  Is it even possible?</p>
  <pre><code>const grid = (props) =&gt; {
      console.log(props);
      let {skuRules} = props;
  
      const componentDidMount = () =&gt; {
          if(!props.fetched) {
              props.fetchRules();
          }
          console.log('mount it!');
      };
      return(
          &lt;Content title=&quot;Promotions&quot; breadcrumbs={breadcrumbs} fetched={skuRules.fetched}&gt;
              &lt;Box title=&quot;Sku Promotion&quot;&gt;
                  &lt;ActionButtons buttons={actionButtons} /&gt;
                  &lt;SkuRuleGrid 
                      data={skuRules.payload}
                      fetch={props.fetchSkuRules}
                  /&gt;
              &lt;/Box&gt;      
          &lt;/Content&gt;  
      )
  }
  </code></pre>