A simple component to download data from a client-side cache (e.g. flux, redux).
Design to be used with browserify or webpack.
Install with:
npm install --save react-download-link
Include with:
import DownloadLink from 'react-download-link'
Use:
<DownloadLink
filename="myfile.txt"
label="Save to disk"
exportFile={() => "My cached data"} />
Or with Promises:
<DownloadLink
filename="myfile.txt"
label="Save to disk"
exportFile={() => Promise.resolve("My cached data")} />