🌍 Public
Viewing a saved revision (read-only)
7151ab055533472ab26e9fb5042af1cd
Menus with React
This example shows a simple pet selector interface built with React. A dropdown menu lets a user choose from a list of animals—dog, cat, hamster, parrot, spider, and goldfish—with the currently selected value displayed via a console log. The implementation uses React's `useState` hook to track the selected value and a custom `Dropdown` component that renders an HTML `<select>` element, mapping options with `options.map`. The app is mounted into the DOM using `ReactDOM.render` from the ReactDOM library, with the UI styled through inline CSS in the index.html file.
AI-generated descriptionReact starter