title: Using fetch with react-excel-workbook
body: <p>My problem is that Excel Export is exporting data to Excel before fetching is completed.</p>
  
  <p><strong>What I want to achieve:</strong> Fetch data when the button is clicked, then after all the data is fetched, export the data to excel. <strong>NB</strong> I do not want to fetch data when the component is rendered for the first time.</p>
  
  <p>This is only one of my attempts:</p>
  
  <pre><code>class ExcelExport extends React.Component {
    getDataForExport = () =&gt; {
      get('/uri')
        .then((response) =&gt; response.items)
        .catch((error) =&gt; []);
    };
  
    render() {
      return (
        &lt;Workbook element={&lt;input type="button" value="Excel Export" /&gt;}&gt;
          &lt;Workbook.Sheet data={() =&gt; this.getDataForExport()} name="Sheet A"&gt;
          &lt;Workbook.Column label="Foo" value="foo"/&gt;        
          &lt;/Workbook.Sheet&gt;      
        &lt;/Workbook&gt;
      );
    }
  }
  </code></pre>
  
  <p>Thank you for any help.</p>