React Dropdown - Classes
This example shows a React class-based application with a dropdown menu for selecting a pet. The dropdown updates a displayed selection using React's component state, managed through a constructor and the `handleChange` method, rather than hooks. The `Dropdown` component receives options, a selected value, and an onChange callback, rendering a native `<select>` element with styled labels. The code uses React 16.13.1, ReactDOM 17.0.1, and D3 v6.2.0, though D3 is loaded but not visibly used in the interaction logic.