fix: island rendered outside of bounding markers (#1495)

This commit is contained in:
Marvin Hagemeister
2023-07-21 17:05:05 +02:00
committed by GitHub
parent 3ab35a44f9
commit 5d07e6e9eb
9 changed files with 130 additions and 29 deletions
@@ -0,0 +1,8 @@
export default function FragmentIsland() {
return (
<>
<p>it{" "}</p>
<p>works</p>
</>
);
}
@@ -0,0 +1,3 @@
export default function IslandCenter() {
return <p class="island">center</p>;
}
@@ -0,0 +1,17 @@
import { VNode } from "preact";
import FragmentIsland from "./FragmentIsland.tsx";
function Foo(props: { children: () => VNode }) {
return props.children();
}
export default function IslandFn() {
return (
<div class="island">
<Foo>
{() => <FragmentIsland />}
</Foo>
</div>
);
}