Skip to main content
100%

Fork of Loading Data with React & D3

✓ Published0🌍 Public
AAbi360
Last edited Aug 9, 2021
Created on Aug 9, 2021

Loading data with React and D3 displays a grid of colored squares, each representing a CSS named color from a remote CSV file. The React component uses the `useState` and `useEffect` hooks to fetch the data via `d3.csv`, updating the component once the dataset arrives. While loading, the page shows a large "Loading..." message. After the data loads, it renders each row as a `div` whose background color is set to the color's `RGB hex value` from the CSV. The code imports React, ReactDOM, and the `csv` function from D3 v7.

AI-generated description

A 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

Similar vizzes