Skip to main content
100%

Rendering data with React

✓ Published1🌍 Public
MMyTrueName
Last edited Apr 24, 2021
Created on Apr 23, 2021
Forked from Mouse follower

This example fetches CSS named color data from a CSV file using d3.csv and renders each row as a colored horizontal strip via React components. The React app uses the useState and useEffect hooks to load the data asynchronously, displaying a loading message until the CSV resolves. Each div’s background color is set directly from the ‘RGB hex value’ column, producing a 960-pixel-wide spectrum of 148 color swatches. ReactDOM renders the top-level App component into the page root, with styling applied through inline attributes.

AI-generated description

A program that loads some color data using d3 and renders it using React.

MIT Licensed

Similar vizzes