title: implementation of component did mount in stateless component
body: <p>Im new to react, i'm trying to implement/learn stateless component, Im having difficulty in using component will mount in stateless component.</p>
  
  <p>My code</p>
  
  <pre><code>const Terms = (actions, commonReducer) =&gt; {
  componentDidMount() {
      actions.userActions()
  }
  
  return (
      &lt;div className="jobUpdate"&gt;
  
          &lt;form onSubmit={(e) =&gt; {
              e.preventDefault(); actions.userInput(document.getElementById('enteredVal').value)
          }}&gt;
              &lt;input type="text" id="enteredVal" /&gt;
              &lt;button type="submit"&gt;&lt;/button&gt;
          &lt;/form&gt;
  
  
      &lt;/div&gt;
  );
  </code></pre>
  
  <p>};</p>
  
  <p>I know the stateless component does not have life cycle hooks, but wanted alternate approach to preform component did mount in stateless component.</p>
  
  <p>Any help with this is much appreciated. Thanks in advance </p>