Menus with React
✓ Published0🌍 Public
A dropdown menu for selecting a pet uses React and ReactDOM to manage its state. The example defines a reusable `Dropdown` component that accepts options, an id, a selected value, and a callback. It displays a list of pets from an array of objects. The app initializes with "hamster" as the selected value and logs each new choice to the console via `useState`. The interface relies on a `<select>` element, with a custom prompt for an empty selection.
AI-generated descriptionReact Starter Code.
MIT Licensed