🌍 Public
Viewing a saved revision (read-only)
94cf214344484a6daf0d1e784b92598b
Menus with React
This example shows a pet-selection menu built with React. It presents a dropdown list of six animal options and displays the currently chosen value in the browser console. The code defines a reusable `Dropdown` component that renders an HTML `<select>` element, mapping each option’s value and label. The main `App` component manages the selected state using `useState` and passes the change handler to update it, with React 18 rendering the interface into the root `div`.
AI-generated descriptionA bare minimum HTML page.