title: Data export using react-data-table-component export csv
body: <p>I am new to React.</p>
  <p>I am trying to export JSON data that is displayed using the 'react-data-table-component' to a CSV file.</p>
  <p>I have followed the example from <a href="https://react-data-table-component.netlify.app/?path=/docs/examples-export-csv--export-csv&amp;globals=backgrounds.grid:false;backgrounds.value:transparent" rel="nofollow noreferrer">this link</a> by copying the exact code snippet provided. Below is my code snippet and the corresponding error occurring during compilation.</p>
  <pre><code>import Export from &quot;react-data-table-component&quot;
  import DataTable, { TableColumn, TableStyles } from &quot;react-data-table-component&quot;;
  import React from &quot;react&quot;;
  
    ---code declarations---
  
    const actionsMemo = React.useMemo(() =&gt; &lt;Export onExport={() =&gt; downloadCSV(customerList)} /&gt;, []);
  
    return (
      &lt;&gt;
        &lt;Row&gt;
          &lt;Col lg={3}&gt;
            &lt;Box className=&quot;box&quot; sx={{ display: 'flex', alignItems: 'flex-end' }}&gt;
            
              &lt;TextField id=&quot;input-with-sx&quot; label=&quot;Input National ID&quot; variant=&quot;standard&quot; /&gt;
              &lt;PersonSearchIcon sx={{ color: 'action.active', mr: 1, my: 0.5 }} /&gt;
            &lt;/Box&gt;
          &lt;/Col&gt;
        &lt;/Row&gt;
        &lt;br/&gt;
        &lt;Row&gt;
          &lt;Col lg={12}&gt;
            &lt;div className=&quot;card mb-3&quot;&gt;
              &lt;div className=&quot;card-body&quot;&gt;
                &lt;DataTable columns={columns} data={customerList}
                  pagination  customStyles={mycustomStyles} actions={actionsMemo}/&gt;
              &lt;/div&gt;
            &lt;/div&gt;          
          &lt;/Col&gt;
        &lt;/Row&gt;
      &lt;/&gt;
    );
  </code></pre>
  <p><a href="https://i.stack.imgur.com/aod1l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aod1l.png" alt="compilation error" /></a></p>
  <p>Could someone help me in identifying any other modules that I may be missing in order to have an export data functionality. Thanks in advance.</p>