🌍 Public
Viewing a saved revision (read-only)
4765485f51c145919e9096a86858f7c8
React Menus
A React component called `Dropdown` presents a select menu for choosing a pet from six hard-coded options. The app tracks the chosen value in state and logs each selection to the console. The `Dropdown` component is a reusable `<select>` element that maps over an options array to generate `<option>` elements and triggers a callback on change. The example uses `useState` from React and `ReactDOM.render` to mount the app, with a label and styled listbox.
AI-generated descriptionReact starter code.