Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading Data React

Public visualization

Loading Data React

0 stars0🌍 Public
GGuus Lammers
Last edited Mar 1, 2022
Created on Mar 1, 2022
Forked from Mouse Follower

This example shows the loading state of a React app as it fetches a CSV file of CSS named colors from a GitHub gist. The interface displays a formatted text summary with the file size in kilobytes, row count, and column count once the data arrives, preceded by a “Loading…” message. The code uses React hooks `useState`, `useEffect`, and `useCallback` to manage the asynchronous `d3.csv` fetch, while a separate `Message` component computes the statistics using `d3.csvFormat`. Data is rendered as HTML text within a `<pre>` tag.

AI-generated description

Smiley face implementation with React & D3.

Comments

Sign in to join the discussion.

MIT Licensed