fix: plugin script error halting JS execution (#1801)

This commit is contained in:
Marvin Hagemeister
2023-09-20 12:28:32 +02:00
committed by GitHub
parent 0c37b5f9b9
commit 3db514f869
8 changed files with 127 additions and 2 deletions
@@ -0,0 +1,17 @@
import { useEffect } from "preact/hooks";
import { useSignal } from "@preact/signals";
export default function Island() {
const sig = useSignal(false);
const count = useSignal(0);
useEffect(() => {
sig.value = true;
}, []);
return (
<div id={sig.value ? "ready" : "not-ready"}>
<p>{count}</p>
<button onClick={() => count.value++}>click me</button>
</div>
);
}