Complete the code to import the Island component correctly in Fresh.
import [1] from "./components/Counter.tsx";
The Island component must be imported with the exact name used in the component file, which is usually Island.
Complete the code to mark the component as an Island in Fresh.
export default [1](Counter);The withIsland function wraps the component to mark it as an Island in Fresh.
Fix the error in the Island component usage by completing the attribute to hydrate the Island.
<Counter [1] />The client:load attribute tells Fresh to hydrate the Island immediately after the page loads.
Fill both blanks to create a simple Island component with state and event handler.
const [count, [1]] = useState(0); <button onClick=[2](() => setCount(count + 1))>Click</button>
setCount updates the state, and useCallback memoizes the click handler for performance.
Fill all three blanks to complete the Island component export with client hydration and import.
import [1] from "preact/hooks"; import Counter from "./Counter.tsx"; export default [2](Counter, { [3]: true });
We import useState hook, wrap the component with withIsland, and enable client:load hydration.
