/** @jsx h */
/** @jsxFrag Fragment */
import { h, Fragment } from "preact";
import { useState } from "preact/hooks";
export default function Component() {
const [show, setShow] = useState(false);
return (
<>
Hello
<div onClick={() => setShow(true)}>
World
</div>
{show && (
<div>I'm not rendered</div>
)}
</>
);
}
This will error with Uncaught (in promise) DOMException: Node.insertBefore: Child to insert before is not a child of this node on the client when World is clicked.
This will error with
Uncaught (in promise) DOMException: Node.insertBefore: Child to insert before is not a child of this nodeon the client whenWorldis clicked.