🌍 Public
Viewing a saved revision (read-only)
d3088e4c066b487cb3dbf94421f35d09
Menus with React
This example demonstrates a React-based dropdown menu for selecting a pet from a list of six options. The chosen value is logged to the console and passed as a prop to a custom `Dropdown` component, which renders a native HTML `<select>` element. The component manages its state using React’s `useState` hook and updates the selection via an `onSelectedValueChange` callback. The code uses React 16.9 and ReactDOM, with the app mounted into a root div.
AI-generated descriptionA scatter plot of The Iris Dataset.