🌍 Public
Viewing a saved revision (read-only)
b5a76e9da12b4aa1891f6d1e06602ea3
Menus with React
This example shows a pet-selection menu built with React, demonstrating how to manage form state with the `useState` hook and a reusable `Dropdown` component. The interface displays a label and a `<select>` element with five animal options, defaulting to "hamster"; changing the selection logs the chosen value to the console. The code uses React and ReactDOM from UMD builds, along with JSX syntax, to render the component tree into the `#root` element.
AI-generated descriptionReact starter code