title: Warning: unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering
body: <p>I use <code>export-to-csv</code> to export a table data to csv format.<br>
  I am getting this error:</p>
  
  <blockquote>
    <p>unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.</p>
  </blockquote>
  
  <pre class="lang-js prettyprint-override"><code>{toCSV &amp;&amp; &lt;ExportToCSV fileName={fileName} title={title} csvData={csvData} /&gt;}
  export default function ExportToCSV (props) {
    const { title, fileName, csvData } = props
    const options = {
      filename: fileName,
      fieldSeparator: ',',
      quoteStrings: '"',
      decimalSeparator: '.',
      showLabels: true,
      title: title || 'ExcelReader File',
      showTitle: true,
      useTextFile: false,
      useBom: true,
      useKeysAsHeaders: true
    }
    const csvExporter = new ExportToCsv(options)
    csvExporter.generateCsv(csvData)
    return &lt;div/&gt;
  }
  </code></pre>