title: React useForm get value from TextBox
body: <p>I am using React useForm hook to submit data from my form. The requirement is the user should see the sample data in a preview div before he submits. How can i get the value from input text boxes and display it in a div next to the input. In the documentation there is getValue method can that be used?</p>
  <pre><code>&lt;form&gt;
  &lt;div class=&quot;mb-6&quot;&gt;
              &lt;label  class=&quot;block mb-2&quot;&gt;Enter Title: &lt;/label&gt;
              &lt;input  type=&quot;text&quot; id=&quot;page_text&quot; class=&quot;text-white&quot; placeholder=&quot;Enter Title&quot; {...register('page_Title',{ required: &quot;Enter Your Title&quot;, maxLength: {value:255,message:&quot;Cannot Exceed more 255 Characters&quot; } })}/&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  &lt;div className= &quot;text-white text-center rounded-xl shadow-xl&quot;&gt;
              &lt;h1&gt;Preview&lt;/h1&gt;
              &lt;h3&gt;{getValues(&quot;page_Title&quot;)}&lt;/h3&gt;
  &lt;/div&gt;
  </code></pre>