Menus with React
✓ Published0🌍 Public
This example shows a React component for selecting a pet from a dropdown menu, with the chosen value logged to the console. It uses React’s `useState` hook to manage the selected option and a reusable `Dropdown` component that renders a native HTML `<select>` element. The dropdown maps over an array of pet objects, setting the `selected` attribute based on the current state value, and calls `onSelectedValueChange` on user input to update that state. The app is rendered into the DOM with `ReactDOM.render`.
AI-generated descriptionMakin' menus with React
MIT Licensed