🌍 Public
Viewing a saved revision (read-only)
a7e06b7be8fd4b4d82146bf7a1cf450a
loadDataState
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 descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
loading data w/ d3 utils && react state