Skip to main content
100%

React Hooks Bowl of Fruit

✓ Published0🌍 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.

MIT Licensed

Similar vizzes