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)

79966d9753174bb694a80b22903d55a7

React Hooks Bowl of Fruit

0 stars0🌍 Public
GGeolffrey S Mena
Last edited Jan 11, 2020
Created on Jan 11, 2020

A row of apples rendered as SVG circles demonstrates React Hooks state management. The `FruitBowl` component maps fruit data to circles, using D3's `scaleOrdinal` for color and radius scales. React's `useState` tracks the selected fruit, and clicking a circle updates its selection, toggling a black stroke. The example uses D3.v5 for scales and React 16.8's Hooks API within a static fruit array.

AI-generated description

Trying out React Hooks.