Dataviz 9 - Menus
This example demonstrates a simple pet-selection interface built with React. A dropdown menu lets users choose from a list of six animals, including dog, cat, hamster, parrot, spider, and goldfish, with the selected value logged to the console. The code uses React’s `useState` hook to manage the current selection and renders a custom `Dropdown` component, which wraps a native HTML `<select>` element. The `Dropdown` receives options, an ID, and a change handler, updating the state whenever the user picks a new value.