title: Use multiple forms in one project with React Hook Form
body: <p>I have two separate files with two separate components. I want to have two independent instances of form in each of them. In each component form is implemented as shown in the docs <a href="https://react-hook-form.com/get-started" rel="nofollow noreferrer">here</a> so using <strong>useForm</strong> hook. React throws me the error which says:</p>
  <blockquote>
  <p>Error: Invalid hook call. Hooks can only be called inside of the body of a function component.</p>
  </blockquote>
  <p>I discovered that's because I have the <strong>useForm</strong> hook declared multiple times (in each component). If I removed one form, the project compiles and works as supposed to (with one form only).
  The question is - how can I implement two separate and independent instances of form in multiple components?</p>
  <p>I guess it's unnecessary to attach code, it's logical problem with implementation, the code is correct.</p>