title: Formik FieldArray error messages - React Native
body: <p>I'm using Formik <code>FieldArray</code> as part of my form and would like to show error messages, I can access the error messages within a component via <code>errors.familyMembers[0]</code>, which looks like</p>
  <pre><code>[{&quot;first_name&quot;: &quot;First Name is a required field&quot;, &quot;last_name&quot;: &quot;Last Name is a required field&quot;}]
  </code></pre>
  <p>To show the error I have 2 parts where I need to extract the error message</p>
  <pre><code>isInvalid={fieldName in errors.familyMembers[0] &amp;&amp; touched[fieldName]}
  
  &lt;FormErrorMessage
    message={errors.familyMembers[0][fieldName]}
    isVisible={touched[fieldName]}
  /&gt;
  </code></pre>
  <p>The problem is when the component is initially rendered <code>errors.familyMembers[0]</code> is <code>undefined</code>, which gives me the error</p>
  <pre><code>undefined is not an object (evaluating 'errors.familyMembers[0]')
  </code></pre>
  <p>Is there a way I can guard against <code>undefined</code> and have the messages show if available? Hope that makes sense</p>