feat: allow passing JSX children to island + nested islands (#1285)

This commit is contained in:
Marvin Hagemeister
2023-06-15 10:08:48 +02:00
committed by GitHub
parent 372d0dfffb
commit ce0eda7654
24 changed files with 873 additions and 67 deletions
@@ -0,0 +1,26 @@
import { ComponentChildren } from "preact";
import Island from "../islands/Island.tsx";
function Foo(props: { children?: ComponentChildren }) {
return (
<div class="server">
{props.children}
</div>
);
}
export default function Home() {
return (
<div id="page">
<Island>
<Foo>
<Island>
<Foo>
<p>it works</p>
</Foo>
</Island>
</Foo>
</Island>
</div>
);
}