Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading Data With React

Public visualization

Loading Data With React

0 stars1🌍 Public
GGabriel
Last edited Apr 6, 2022
Created on Apr 6, 2022
Forked from Mouse Tracking

This example demonstrates how to load data asynchronously in a React application, displaying the size of a CSV file once it has been fetched. The code uses React’s `useState` and `useEffect` hooks to manage state and trigger the data loading process. It leverages the D3 `csv` and `csvFormat` functions to parse the file from a GitHub gist, then computes and renders the file’s size in kilobytes, row count, and column count in a large `<pre>` element. While the data loads, the UI shows a “loading...” message.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed