Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
export-data
Advanced tools
Export data in React to CSV and other file formats
<FileDownloadLink
fileType="CSV"
columnNames={["Fruit", "Price"]}
filename="fruits"
rows={[
["Apple", 1],
["Watermelon", 5],
["Durian", 10],
]}
>
Download data
</FileDownloadLink>
export type FileDownloadLinkProps = {
/** The type of file to be exported. */
fileType: FileType;
/** The text encoding of the data, utf-8 by default. */
encoding?: string;
/** The column names of the data. */
columnNames: (string | number)[];
/** The rows of the data. */
rows: (string | number)[][];
/** The filename for the exported file. */
filename?: string;
/** A function to be called when the link is clicked before the data is downloaded.
* If this function modifies the data to be downloaded, then you must set
* setsDataAsyncInOnClick to true and call the `download` function when complete.
*/
onClick?: (e: React.MouseEvent<HTMLAnchorElement>, download: () => void) => void;
/** If the data is set asynchronously in onClick, then this must be set to true. */
setsDataAsyncInOnClick?: boolean;
/** The content for rendering the link. */
children: React.ReactNode;
};
FAQs
Export data in React to CSV and other file formats
The npm package export-data receives a total of 3 weekly downloads. As such, export-data popularity was classified as not popular.
We found that export-data demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.