Hover to Select: Interaction with Unidirectional Data Flow
✓ Published0🌍 Public
AAnnie Liao
Last edited Jun 22, 2020
Created on Jun 22, 2020
Five fruit circles render in an SVG using D3 v5 within a React framework, with apples and lemons distinguished by ordinal color and radius scales. Hovering over a circle triggers a navy stroke via mouseover and mouseout events, updating a selectedFruit state variable that flows unidirectionally into the fruitBowl render function. Transitions animate circle entry, exit, and size changes over one-second durations as the fruit array is modified through pop and type replacement operations.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.
MIT Licensed