Menus with React
✓ Published0🌍 Public
This example shows a pet-selection menu built with React. It displays a dropdown list of six animal options, with a hamster preselected. The app uses React’s `useState` hook to track the selected value, which is logged to the console on change. The `Dropdown` component, defined in a separate file, maps over the option objects to render each `<option>` element, with the selected value triggering a change event. The page loads React and ReactDOM from unpkg and renders the app into the root div.
AI-generated descriptionReact starter code.
MIT Licensed