title: Are called HOC equivalent to regular components for purposes of hooks?
body: <p>So there are two possible ways to use React hooks:</p>
  
  <ol>
  <li>directly</li>
  </ol>
  
  <pre class="lang-js prettyprint-override"><code>const Signup = props =&gt; {
    const [onSubmit, {data}] = useMutation (SIGNUP_GQL)
    return (
      ...
    )
  }
  export default Signup
  </code></pre>
  
  <ol start="2">
  <li>in a HOC</li>
  </ol>
  
  <pre><code>const withMutation = gql =&gt; C =&gt; props =&gt; {
     const [onSubmit, {data}] = useMutation (SIGNUP_GQL)
     return &lt;C onSubmit={onSubmit} data={data} /&gt;
  }
  
  const Signup = ({onSubmit, data}) =&gt; (
    ...
  )
  export default withMutation (SIGNUP_GQL) (Signup)
  </code></pre>
  
  <p>I prefer the second pattern. Before I structure my whole app this way, I'd like to make sure it's ok. In particular, whether the two patterns are fundamentally equivalent (regardless of the implementation), and if not, whether the implementation has full support using hooks in HOCs.</p>
  
  <p>Cheers!</p>