import { useState } from "https://esm.sh/hono/jsx/dom";
export default function Counter(props: { initialCount?: number }) {
const [count, setCount] = useState(props.initialCount || 0);
return (
<button
onClick={() => {
console.log("clicked!");
setCount(count + 1);
}}
>
Count: {count}
</button>
);
}