Menus with React
✓ Published0🌍 Public
This example shows a simple pet selector menu built with React, displaying a dropdown list of six animals and logging the current selection to the console. The interface uses a label and a <select> element, with the dropdown component receiving options, an ID, a selected value, and a change handler as props. The app manages state through React’s useState hook and renders the dropdown via ReactDOM. React 16.9.0 and ReactDOM are loaded from unpkg, with styling applied directly in the HTML document.
AI-generated descriptionReact starter code.
MIT Licensed