title: useForm is called in function which is neither a React function component... error
body: <p>the following code is making the strangest error.</p>
  
  <blockquote>
    <p>/src/components/competitions/TheVaultform.js   Line 5:  React Hook
    "useForm" is called in function "contactform" which is neither a React
    function component or a custom React Hook function 
    react-hooks/rules-of-hooks</p>
    
    <p>Search for the keywords to learn more about each error.</p>
  </blockquote>
  
  <p>I have only just installed react-hook-form and ran the demo code.</p>
  
  <pre><code>import React from 'react';
  import { useForm } from 'react-hook-form';
  
  export default function contactform() {
    const { register, handleSubmit, errors } = useForm();
    const onSubmit = data =&gt; console.log(data);
    console.log(errors);
  
    return (
      &lt;form onSubmit={handleSubmit(onSubmit)}&gt;
        &lt;input type="text" placeholder="First name" name="First name" ref={register({required: true, maxLength: 80})} /&gt;
        &lt;input type="text" placeholder="Last name" name="Last name" ref={register({required: true, maxLength: 100})} /&gt;
        &lt;input type="text" placeholder="Email" name="Email" ref={register({required: true, pattern: /^\S+@\S+$/i})} /&gt;
        &lt;input type="tel" placeholder="Mobile number" name="Mobile number" ref={register({required: true, minLength: 6, maxLength: 12})} /&gt;
        &lt;select name="Title" ref={register({ required: true })}&gt;
          &lt;option value="Mr"&gt;Mr&lt;/option&gt;
          &lt;option value="Mrs"&gt;Mrs&lt;/option&gt;
          &lt;option value="Miss"&gt;Miss&lt;/option&gt;
          &lt;option value="Dr"&gt;Dr&lt;/option&gt;
        &lt;/select&gt;
  
        &lt;input name="Developer" type="radio" value="Yes" ref={register({ required: true })}/&gt;
        &lt;input name="Developer" type="radio" value="No" ref={register({ required: true })}/&gt;
  
        &lt;input type="submit" /&gt;
      &lt;/form&gt;
    );
  }
  </code></pre>