🌍 Public
Viewing a saved revision (read-only)
961dd16356a54604bd98a90b688b9d2f
Menus with React
A React-based dropdown menu demonstrates state-driven selection through a pet-choice interface. The `Dropdown` component renders HTML `<select>` options, mapping over the `options` array to create `<option>` elements. The `App` component manages a `selectedValue` state via React's `useState` hook, logging each change to the console. The starter projects React 17 with ReactDOM, updating the selection visually and programmatically through the `onSelectedValueChange` callback. The page displays a large-print label and select element, with no external data source—the four pet choices are hardcoded in `index.js`.
AI-generated descriptionReact starter code.