Complete the code to load the component only on the client after the page loads.
<MyComponent [1] />The client:load directive tells Astro to load the component only on the client side after the page has loaded.
Complete the code to import and use a component with client:load directive.
import MyComponent from './MyComponent.astro'; export default function Page() { return <MyComponent [1] />; }
Using client:load on the component ensures it loads on the client after the page load.
Fix the error in the code to correctly use client:load directive on the component.
<MyComponent [1] />The correct syntax uses a colon: client:load. Other forms are invalid.
Fill both blanks to create a component that loads on client after page load and passes a prop.
<MyComponent [1] title=[2] />
Use client:load to load after page load and pass the string "Hello" as the title prop.
Fill all three blanks to create an object that loads components with client:load and filters names with length > 3.
const components = Object.fromEntries( names.filter(name => name.length > 3) .map([1] => [ [2], <MyComponent [3] title={name} /> ]) );
The object keys use name, the loop variable is name, and the directive is client:load.