🌍 Public
Viewing a saved revision (read-only)
d0667075490045b6abef4f7491db5c3a
Menus with React
This example demonstrates a simple pet selector menu built with React and D3 v6. It shows how a dropdown list updates a displayed value based on user selection. The app uses React’s `useState` hook to manage the selected option and passes the current value and change handler to a reusable `Dropdown` component, which renders an HTML `<select>` element. The menu allows choosing among six predefined pet options, with a large label and select styled via CSS.
AI-generated descriptionReact starter code.