🌍 Public
Viewing a saved revision (read-only)
e9d774c24fcd447fa0e9d4460ab2951d
Menu with Reat
This example demonstrates a simple pet-selection dropdown menu built with React. It shows a labeled select element populated with six animal options, each with a value and display label. The code uses the React `useState` and `ReactDOM.render` APIs, along with the `map` function to generate `<option>` elements from a hardcoded array of pet objects. The component structure separates a reusable `Dropdown` component from the main `App` component, which renders the label and dropdown together.
AI-generated descriptionReact Starter Code