New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-export-csv

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-export-csv

React Export CSV component

latest
Source
npmnpm
Version
0.0.4
Version published
Weekly downloads
47
-27.69%
Maintainers
1
Weekly downloads
 
Created
Source

React Export CSV

NPM JavaScript Style Guide

React Export CSV component for React.

Installation

npm install --save react-export-csv

Documentation

PropsTypeDefaultDetails
headerarraynullheader for CSV file
dataarraynulldata row for CSV file
separatorstring;CSV separator (";" / "," / ...)
callbackfunctionnullcallback data
isDownloadbooleanfalseif auto download file
filenamestring"no_name.csv"file name downloaded file

Getting started

Import Component and style

import { ExportCSV } from 'react-export-csv'

Render Component

<ExportCSV
  header={[
    {
      name: "Col 1",
      key: "col_1"
    },
    {
      name: "Col 2",
      key: "col_2"
    }
  ]}
  data={[
    {
      col_1: "Data 1 col 1",
      col_2: "Data 1 col 2"
    },
    {
      col_1: "Data 2 col 1",
      col_2: "Data 2 col 2"
    }
  ]}
  separator={';'}
  callback={(res) => console.log(res)}
  isDownload={true}
  filename={"test.csv"}
/>

License

MIT © noah-lnt

FAQs

Package last updated on 29 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts