feat: co-locate islands + non-route files (#1600)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { useSignal } from "@preact/signals";
|
||||
|
||||
export default function Counter() {
|
||||
const signal = useSignal(0);
|
||||
return (
|
||||
<div>
|
||||
<p>{signal}</p>
|
||||
<button
|
||||
onClick={() => signal.value += 1}
|
||||
>
|
||||
+1
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export default function InvalidPage() {
|
||||
return <p>This should not be visible</p>;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import Counter from "./(_islands)/Counter.tsx";
|
||||
|
||||
export default function GroupPage() {
|
||||
return (
|
||||
<div>
|
||||
<h1>Group page</h1>
|
||||
<Counter />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export default function InvalidPage() {
|
||||
return <p>This should not be visible</p>;
|
||||
}
|
||||
Reference in New Issue
Block a user