Skip to main content
100%

Loading Data With React

✓ Published1🌍 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.

MIT Licensed

Similar vizzes