major: import Fresh 2.0 code (#2449)

🎉
This commit is contained in:
Marvin Hagemeister
2024-05-24 09:40:08 +02:00
committed by GitHub
parent 990357629e
commit 287929e4d2
958 changed files with 15794 additions and 28287 deletions
@@ -0,0 +1,15 @@
import { useSignal } from "@preact/signals";
import { useEffect } from "preact/hooks";
export function Foo() {
const active = useSignal(false);
useEffect(() => {
active.value = true;
}, []);
return (
<div class={active.value ? "ready" : ""}>
{active.value ? "it works" : "it doesn't work"}
</div>
);
}
@@ -0,0 +1,9 @@
import { Foo } from "./(_islands)/Foo.tsx";
export default function Home() {
return (
<div>
<Foo />
</div>
);
}
@@ -0,0 +1,3 @@
export default function Home() {
return <h1>hello world</h1>;
}