Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

React Hooks Bowl of Fruit

Public visualization

Viewing a saved revision (read-only)

93993e631eee4a59810d99268330250d

React Hooks Bowl of Fruit

0 stars0🌍 Public
Ccodexmon
Last edited Jun 29, 2020
Created on Jun 29, 2020

A static bowl of fruit rendered as SVG circles demonstrates React Hooks and D3.js scale constructors working together. Using `d3.scaleOrdinal` for both fill color and radius, five red apples appear in a row, with the first apple highlighted by a black stroke on click. The `FruitBowl` component receives array data and handles selection state via React's `useState`, while the code includes commented-out transition logic for future interactive animation, indicating a placeholder for D3's `.transition()` API.

AI-generated description

Trying out React Hooks.