title: Why defaultValue from React hook form can not work in react
body: <p>I stuck in a problem. I am using <a href="https://react-hook-form.com/get-started#Quickstart" rel="nofollow noreferrer">React Hook Form</a>
  in my shipment component everything has gone well but while i try to use react hook form for my shipment component and setting default value on these component it's not work accurately. My code is given below:</p>
  <pre><code>import React, { useContext } from 'react';
  import { useForm } from 'react-hook-form';
  import { UserContext } from '../../App';
  import './Shipment.css';
  
  const Shipment = () =&gt; {
  const { register, handleSubmit, watch, formState: { errors } } = 
  useForm();
  
  const [loggedInUser,setLoggedInUser] = useContext(UserContext);
  
  const onSubmit = data =&gt; {
      console.log('form submitted',data);}
  
  console.log(watch(&quot;example&quot;)); // watch input value by passing the name 
  of it
  
  return (
    
    &lt;form className=&quot;ship-form&quot; onSubmit={handleSubmit(onSubmit)}&gt;
      {/* &lt;input defaultValue={loggedInUser.email} 
   {...register(&quot;example&quot;)} /&gt; */}
      &lt;input name=&quot;name&quot; defaultValue={loggedInUser.name} 
   {...register(&quot;exampleRequired&quot;, { required: true })} placeholder=&quot;Your 
    Name&quot; /&gt;  
      {errors.name &amp;&amp; &lt;span className=&quot;error&quot;&gt;Name is required&lt;/span&gt;}
      &lt;input name=&quot;email&quot; defaultValue={loggedInUser.email} 
    {...register(&quot;exampleRequired&quot;, { required: true })} 
    placeholder=&quot;Email address&quot;/&gt;  
      {errors.email &amp;&amp; &lt;span className=&quot;error&quot;&gt;Email is required&lt;/span&gt;}
  
      &lt;input name=&quot;address&quot; {...register(&quot;exampleRequired&quot;, { required: 
      true })} placeholder=&quot;address&quot;/&gt;  
      
      {errors.address &amp;&amp; &lt;span className=&quot;error&quot;&gt;Address is 
  required&lt;/span&gt;}
      
      &lt;input name=&quot;phone&quot; {...register(&quot;exampleRequired&quot;, { required: true 
      })} placeholder=&quot;Phone number&quot;/&gt;  
      {errors.phone &amp;&amp; &lt;span className=&quot;error&quot;&gt;Phone Number is 
    required&lt;/span&gt;}
      
      &lt;input type=&quot;submit&quot; /&gt;
    &lt;/form&gt;
  );
  };
  
  export default Shipment;
  </code></pre>
  <p><strong>when i attempt to sign in by using email :</strong>
  <a href="https://i.stack.imgur.com/Eg8vo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Eg8vo.png" alt="enter image description here" /></a></p>
  <p><strong>i set default value on name and email field but it's not work except name</strong>
  <a href="https://i.stack.imgur.com/UkJn7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UkJn7.png" alt="enter image description here" /></a></p>
  <p><strong>and my console show only name except all data</strong>
  <a href="https://i.stack.imgur.com/vZUvU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vZUvU.png" alt="enter image description here" /></a></p>
  <p><strong>Actually i need all data and set default value on a specific field</strong></p>