This might be fixing #502, but I am not sure. All tests pass. I've added additional test cases for comments from #502 --------- Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
16 lines
317 B
TypeScript
16 lines
317 B
TypeScript
import { useState } from "preact/hooks";
|
|
|
|
export default function RootFragment() {
|
|
const [shown, setShown] = useState(false);
|
|
|
|
return (
|
|
<>
|
|
Hello
|
|
<div onClick={() => setShown(true)} id="root-fragment-click-me">
|
|
World
|
|
</div>
|
|
{shown && <div>I'm rendered now</div>}
|
|
</>
|
|
);
|
|
}
|