annoted Menus with React
✓ Published0🌍 Public
This example demonstrates a dropdown menu for selecting a pet, with the chosen option displayed in the selection field. Built with React, it uses the `useState` hook to track the selected value, initializing it to `hamster`. The `Dropdown` component maps over an options array to render `<option>` elements, marking the current selection with the `selected` attribute. React DOM renders the app into the root element, and the console logs each state change for inspection.
AI-generated descriptionReact starter code.
MIT Licensed