title: React hook form: How to can I use onChange on React Hook Form Version 7.0
body: <p>Previously I used to write like this:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;input className=&quot;form-control&quot; name=&quot;productImage&quot; type='file' onChange={handleImageUpload} ref={register({ required: true })} /&gt;
  </code></pre>
  <p>After the update I have to write like this:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;input className=&quot;form-control&quot; type=&quot;file&quot; {...register('productImage', { required: true })} /&gt;
  </code></pre>
  <p>How do I use <code>onChange={handleImageUpload}</code> on the updated version of React Hook Form?
  Here is the migration <a href="https://react-hook-form.com/migrate-v6-to-v7/" rel="noreferrer">docs</a></p>
  <p>Please pardon my mistakes in the manner of asking the question. I'm new to these things.
  Thank you.</p>