title: How to set default value in react-hook-form in react-native using custom register method
body: <p>I was testing out react hook form and referring to the documentation <a href="https://react-hook-form.com/get-started#ReactNative" rel="nofollow noreferrer">here</a>. Kindly note that this question is specifically referring to the <strong>Custom Register</strong> method of a manual register.</p>
  
  <p>Passing <code>defaultValues</code> into <code>useForm()</code> does not work as <code>defaultValues</code> doesn't auto populate with the manually registered input, as stated in the <a href="https://react-hook-form.com/api/#useForm" rel="nofollow noreferrer">documentation</a>.</p>
  
  <p>In that case, is there any way to set default value using this method?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>export default function App() {
    const { register, setValue, errors } = useForm()
  
    return (
      &lt;View&gt;
        &lt;Text&gt;First name&lt;/Text&gt;
        &lt;TextInput
          ref={register({ name: 'firstName'}, { required: true })}
          onChangeText={text =&gt; setValue('firstName', text, true)}
        /&gt;
        {errors.firstName &amp;&amp; &lt;Text&gt;This is required.&lt;/Text&gt;}
      &lt;/View&gt;
    )
  }</code></pre>
  </div>
  </div>
  </p>