{"version":"1.0","type":"rich","title":"Menus with react","description":"This example shows how to create an interactive menu in React using controlled components. The app renders a dropdown of pet options, and the selected value is managed by React’s `useState` hook, logging each choice to the console. The reusable `Dropdown` component receives `options`, `id`, `selectedValue`, and an `onSelectedValueChange` callback, using the native HTML `select` element. The code relies on React 18 and ReactDOM for rendering, while D3 v7 is loaded but not explicitly used in the visible logic.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/79cbdc24b8c7437ea3ba99733198f464?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}