import { useSignal } from "@preact/signals"; import { useEffect } from "preact/hooks"; export interface SelfCounterProps { id?: string; } export function SelfCounter(props: SelfCounterProps) { const count = useSignal(0); const active = useSignal(false); useEffect(() => { active.value = true; }, []); return (

{count}

); }