Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading Data React

Public visualization

Viewing a saved revision (read-only)

815d9dced7a54e0d83d45806e0de7ee6

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.