Skip to content

saidkholov/react-download-link

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-download-link

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")} />

About

A React component to download a file with local data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.7%
  • Makefile 2.3%