import React, { useState } from "react";
import "./App.css";
const App = () => {
const [counterA, setCounterA] = useState(0);
const [counterB, setCounterB] = useState(0);
return (
<div>
<button
onClick={() => {
setCounterA(counterA + 1);
}}
>
Increment A
</button>
<button
onClick={() => {
setCounterB(counterB + 1);
}}
>
Increment B
</button>
<div>counterA: {counterA}</div>
<div>counterB: {counterB}</div>
</div>
);
};
export default App;