Skip to main content
100%

dv.30 - menus w/ react

✓ Published0🌍 Public
Zzach b.
Last edited Mar 18, 2021
Created on Nov 6, 2020

A pet-selection interface shows a dropdown menu listing six animals—dog, cat, hamster, parrot, spider, and goldfish—with the parrot preselected. A React state variable stores the current choice, and selecting a new value logs it to the console. The custom `Dropdown` component uses React’s `useState`, `onChange`, and `defaultValue` attributes, while D3 v5 and ReactDOM 16.9 are loaded via unpkg, with the menu styled through global CSS.

AI-generated description

react starter code

--
Datavis 2020 #30

MIT Licensed

Similar vizzes