1.0.0 • Published 4 years ago

react-downloader-file v1.0.0

Weekly downloads
19
License
MIT
Repository
github
Last release
4 years ago

react-downloader-file

react file stream download

Install

$ yarn add react-downloader-file
$ npm install react-downloader-file

Example

import React from 'react';
import DownLoadFile,{DownloadFileProps} from 'react-downloader-file';

const ExampleComponent:React.FC<DownloadFileProps> = props =>{
    return (
        <DownLoadFile
            url="/user/info"
            headerParams={{
                method:'POST',
                credentials:'include',
            }}
        >
         <Button>下载</Button>
        </DownLoadFile>
   )
}
export default ExampleComponent;

License

react-downloader-file available under the MIT License

Keywords

react fetch