🌍 Public
Viewing a saved revision (read-only)
80f005e405fb4199967877df3a41d1f1
Ep. 30 | Menus with React
This interactive example demonstrates a pet-selection menu built with React. It shows a dropdown list of six animal options (dog, cat, hamster, parrot, spider, goldfish), where the currently selected value is highlighted in the interface and logged to the console. The app uses the `useState` hook from React to manage the selected value, and the custom `Dropdown` component renders a native HTML `<select>` element, mapping over the options array to produce `<option>` tags. ReactDOM renders the entire `App` component into the `#root` div, with small inline CSS styling for large label and select fonts.
AI-generated descriptionReact Starter Code.