-
I'm trying to get an interactive For example, my island component is this: import { useState } from "preact/hooks";
interface CounterProps {
start: number;
}
export default function Counter(props: CounterProps) {
const [count, setCount] = useState(props.start);
return (
<div>
<p>{count}</p>
<button onClick={() => setCount(count - 1)}>
-1
</button>
<button onClick={() => setCount(count + 1)}>
+1
</button>
</div>
);
} How do I use that in a vue template to have it lazily hydrated? |
Beta Was this translation helpful? Give feedback.
Answered by
ElMassimo
Jul 25, 2022
Replies: 1 comment 2 replies
-
Hi Christoph! If you run Additionally, the docs are using a Preact island for DocSearch in the navbar. Read the Hydration guide for usage examples. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
codepunkt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Christoph!
If you run
pnpm create iles@next
, you can select to initialize a project with a Preact example.Additionally, the docs are using a Preact island for DocSearch in the navbar.
Read the Hydration guide for usage examples.