Menus with React
This example demonstrates a simple pet-selection dropdown menu built with React, using state to track and log the currently chosen option. It renders a labeled `<select>` element populated with a static array of pet options (dog, cat, hamster, parrot, spider, goldfish), with the initial value set to hamster. The code uses React’s `useState` hook to manage the selected value and a reusable `Dropdown` component that maps over options to create `<option>` elements. ReactDOM mounts the `App` component into the DOM, with styling applied via inline CSS.