Create a component that tracks and displays how many times each button in a group of buttons has been clicked.
MediumProblem Statement
Create a component that tracks and displays how many times each button in a group of buttons has been clicked.
Sample Input
Buttons: ["Button 1", "Button 2", "Button 3"]
Sample Output
Each button displays its own click count.
Limits
Time: 2s · Memory: 256 MB
Code Editor
Log in to submit00:00
Try your code in this preview. Submit marks it done.
import React, { useState } from "react"; const ButtonClickTracker = () => { return ( <div> {/* Render buttons with click counts */} </div> ); }; export default ButtonClickTracker;