React starter - menu
✓ Published0🌍 Public
This example demonstrates a simple pet-selection menu built with React, using a reusable Dropdown component that renders a native HTML `<select>` element. It shows how React state, managed via the `useState` hook, updates the chosen option when a user changes the selection. The `Dropdown.js` file defines the component, mapping over an array of pet options (goldfish, dog, cat, hamster, parrot, spider) and passing the selected value through props. The app is rendered into the DOM using `ReactDOM.render` from React 16.9, with inline styling adjusting the font sizes of the label and select controls.
AI-generated descriptionExample of menus with React
MIT Licensed