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>
19 lines
381 B
TypeScript
19 lines
381 B
TypeScript
import { useState } from "preact/hooks";
|
|
|
|
export default function RootFragmentWithConditionalFirst() {
|
|
const [shown, setShown] = useState(false);
|
|
|
|
return (
|
|
<>
|
|
{shown && <div>I'm rendered on top</div>}
|
|
Hello
|
|
<div
|
|
onClick={() => setShown(true)}
|
|
id="root-fragment-conditional-first-click-me"
|
|
>
|
|
World
|
|
</div>
|
|
</>
|
|
);
|
|
}
|