import { useSignal } from "@preact/signals"; import { useEffect } from "preact/hooks"; import { type ComponentChildren, isValidElement } from "preact"; export interface JsxIslandProps { jsx?: ComponentChildren; children?: ComponentChildren; } export function JsxIsland(props: JsxIslandProps) { const active = useSignal(false); const sig = useSignal(0); useEffect(() => { active.value = true; }, []); return (

{sig}

{props.jsx}
{props.children}
{JSON.stringify({jsx: isValidElement(props.jsx), children: isValidElement(props.children)})}
); }