react-papaparse is the fastest in-browser CSV (or delimited text) parser for React. It is full of useful features such as CSVReader, CSVDownloader, readString, jsonToCSV, readRemoteFile, ... etc.
I have a scenario where I want a download button (CSVDownloader) to trigger and await an asynchronous data fetch before downloading the CSV.
Currently, I am rendering two components (one to kick off the data request and CSVDownloader to download once that data has been retrieved. It would be nice if CSVDownloader awaited data when it is provided as a function so the extra component was unnecessary.
I have a scenario where I want a download button (
CSVDownloader
) to trigger and await an asynchronous data fetch before downloading the CSV. Currently, I am rendering two components (one to kick off the data request andCSVDownloader
to download once that data has been retrieved. It would be nice ifCSVDownloader
awaiteddata
when it is provided as a function so the extra component was unnecessary.