🌍 Public
Viewing a saved revision (read-only)
10ad9fb9cf3747da9f2c191705dd963a
Menus with React
This example demonstrates a pet selector menu built with React, displaying a dropdown list of six pet options and reflecting the current selection through the label above it. The app uses React’s `useState` hook to manage the selected value, initializing with “hamster”, and updates the UI whenever the user changes the dropdown. It leverages the `Dropdown` component, which renders a native HTML `<select>` element, and the ReactDOM `render` method in `index.js` to mount the app to the DOM. The interface uses React 16.9 from a CDN.
AI-generated descriptionReact starter code.