import { useState } from "https://esm.sh/react@18.2.0";
function MyButton() {
const [count, setCount] = useState(0);
function handleClick() {
setCount(count + 1);
}
return (
<button onClick={handleClick}>
Clicked {count} times
</button>
);
}
export function MyApp() {
return (
<div>
<h1>Welcome to my app</h1>
<MyButton />
<MyButton />
</div>
);
}