fix: island rendered outside of bounding markers (#1495)
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user