title: Trying to pass an array of objects as a prop, but react keeps reading it as an object
body: <p>I'm trying to render a table with data gotten after filtering through resources from an API and removing some unnecessary object keys but anytime I try to pass the array as a prop to my table component, I get an error saying &quot;Objects are not valid as prop types&quot;.
  my filter function</p>
  <pre><code>const handleFetch = (query) =&gt; {
      const search = Accountdetails?.filter(
        (data) =&gt; data.holderArpAccountNumber == query,
      );
      return search;
    };
  </code></pre>
  <p>My Array :</p>
  <pre><code>const data = handleFetch(accountNumber)?.map((item) =&gt; {
      return {
        check: &lt;Checkbox /&gt;,
        id: 1,
        holderName: item.holderName,
        certificateNumber: item.certificateNumber,
        holderCompanyAccountNumber: item.holderArpAccountNumber,
        clientCompany: item.issuingCompanyName,
        shareVolume: item.volumeOfBonds,
      };
    });
  </code></pre>
  <p>Table component:</p>
  <pre><code>&lt;Table headers={headers} body={data} /&gt;
  </code></pre>
  <p>table component:</p>
  <pre><code>function Table({ headers, body }) {
    return (
      &lt;div className=&quot;preview_and_save&quot;&gt;
        &lt;div className=&quot;greenpole-header&quot;&gt;Exported CSCS Advice File&lt;/div&gt;
        &lt;table cellSpacing={1} cellPadding={0} className={'tableGrid'}&gt;
          &lt;thead className={'tableHead'}&gt;
            &lt;tr&gt;
              {headers.map((item, i) =&gt; {
                return &lt;td key={i}&gt;{item}&lt;/td&gt;;
              })}
            &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody className={'tableBody'}&gt;
            &lt;tr&gt;
              {body.map((item, j) =&gt; (
                &lt;td key={j}&gt;{item}&lt;/td&gt;
              ))}
            &lt;/tr&gt;
          &lt;/tbody&gt;
        &lt;/table&gt;
      &lt;/div&gt;
    );
  }
  
  export default Table;
  </code></pre>
  <p>logging typeOf data gives an object, but logging Array.isArray(data) gives true</p>