Skip to main content
100%

Menu

✓ Published0🌍 Public
GGabriel
Last edited Apr 14, 2022
Created on Apr 13, 2022
Forked from React Starter

A React menu demonstrates a controlled dropdown component for selecting a favorite Straw Hat Pirate from a hardcoded list of ten characters. The `DropDown` component receives `options`, an `id`, a `selectedValue`, and an `onSelectedValueChange` callback, rendering a native `<select>` element. The parent `App` component manages the selected value via `useState`, initializing it to "Jinbe" and logging each change to the console. The example uses React 18's production UMD builds and `ReactDOM.render`, with the selection state updating the dropdown's highlighted option.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes