title: Why does react-table Column not accept a function as accessor?
body: <p>I have encountered a small problem converting my app to typescript. Here is the (shortened) code:</p>
  <p>I have a type with a simple string property:</p>
  <pre class="lang-js prettyprint-override"><code>export type Person = {
       birth_date: string
  ...
  </code></pre>
  <p>This is used in a custom table component using <code>react-table</code>:</p>
  <pre class="lang-js prettyprint-override"><code>import {useTable, useSortBy, Column} from 'react-table'
  
  const PersonTable: FC&lt;{persons: Person, columns: Column&lt;Person&gt;}&gt; = ({ persons, columns }) =&gt; {
  
    const { getTableProps, getTableBodyProps, headerGroups, rows, prepareRow } =
        useTable&lt;Person&gt;({ columns, data: persons }, useSortBy)
  ...
  </code></pre>
  <p>Because birth_date is formatted YYYY-MM-DD, I want to change it to something readable when defining the columns, where formatDate returns a string:</p>
  <pre class="lang-js prettyprint-override"><code>const columnsPersons = useMemo(() =&gt; [
      {
          Header: 'Birth date',
          accessor: (row: Person) =&gt; formatDate(row.birth_date)
      }
  ], [])
  </code></pre>
  <p>But when I set</p>
  <pre class="lang-js prettyprint-override"><code>&lt;PersonTable columns={columnsPersons} ...
  </code></pre>
  <p>I get the following error (shortened):</p>
  <pre><code>Type '{ Header: string; accessor: string; }' is not assignable to type '{ accessor: &quot;birth_date&quot;; }'.
  Types of property 'accessor' are incompatible.
  Type 'string' is not assignable to type '&quot;birth_date&quot;'.
  </code></pre>
  <p>I know I can use a function for the accessor, because this works. But I don't know if I'm using and / or typing it correctly. Any help is appreciated.</p>