🌍 Public
Fork of Loading Data with React & D3
This example displays CSS named colors as horizontal swatches stacked vertically, each rendered as a colored div. It fetches the CSS named colors dataset from a GitHub gist using D3’s `csv` utility, then stores the parsed result in React state via the `useState` and `useEffect` hooks. While the data loads, the interface shows a large “Loading…” message; once loaded, it maps each row to a div whose background color matches the row’s RGB hex value, creating a full-width color spectrum strip.
AI-generated descriptionA program that loads in some data about CSS named colors using D3 utilities, and uses React state to keep track of the data.
MIT Licensed
Comments
Sign in to join the discussion.