This PR makes nested islands work. Problem was that only entry files have the `src` property in the vite manifest. For that we need to ensure that every island is an entry point. Fixes https://github.com/denoland/fresh/issues/3439
18 lines
360 B
TypeScript
18 lines
360 B
TypeScript
import { useEffect, useState } from "preact/hooks";
|
|
import { IslandNestedInner } from "./IslandNestedInner.tsx";
|
|
|
|
export function IslandNestedOuter() {
|
|
const [ready, set] = useState(false);
|
|
|
|
useEffect(() => {
|
|
set(true);
|
|
}, []);
|
|
|
|
return (
|
|
<div class={ready ? "outer-ready" : ""}>
|
|
<p>Outer</p>
|
|
<IslandNestedInner />
|
|
</div>
|
|
);
|
|
}
|