Skip to main content
100%

loadDataState

✓ Published1🌍 Public
MMatt Lane
Last edited Jul 28, 2022
Created on Jul 27, 2022
Forked from mouse

This example shows how React state manages the lifecycle of data loaded with D3. It displays a summary message (row and column counts) from a CSV file containing CSS named colors. The code uses React hooks (`useState`, `useEffect`) to fetch data asynchronously with `d3.csv` and store it in state. A loading indicator appears until the promise resolves, then the `message` utility formats the dataset’s dimensions for display.

AI-generated description

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

See also React Starter.

loading data w/ d3 utils && react state

MIT Licensed

Similar vizzes