Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

7.14MenusWithReact

Public visualization

7.14MenusWithReact

0 stars0🌍 Public
Cchristine
Last edited Oct 9, 2022
Created on Oct 9, 2022

This example demonstrates a React-based UI that lets users select a pet from a dropdown menu. It showcases how React state manages the selected value, which is logged to the console. The code uses React's `useState` hook and a custom `Dropdown` component to render the HTML `<select>` element, while D3 v7 is loaded for potential charting but not actively used. The interaction is simple, with options defined for six pets.

AI-generated description

React starter code.

Comments

Sign in to join the discussion.

MIT Licensed