🌍 Public
Viewing a saved revision (read-only)
c1dfa17a001b43b48349c3162333c1bf
Fork of Loading Data
This example demonstrates a React application that loads a CSV file of CSS named colors from a GitHub gist using D3’s `csv` function, displaying each color as a colored square. While the data loads, it shows a large “Loading…” message. The code uses React’s `useState` and `useEffect` hooks to fetch the data asynchronously, then maps over the resulting array to render `div` elements with inline styles for the background color. The implementation relies on `ReactDOM` for rendering and D3 v5 for CSV parsing, with a simplified, non-optimized approach visible in the code.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.