Complete the code to import a Svelte component into an Astro file.
--- import MyComponent from './MyComponent.svelte'; --- <MyComponent [1] />
client:load instead of client:only.Use client:only to load a Svelte component in Astro on the client side only.
Complete the code to pass a prop named 'title' with value 'Hello' to a Svelte component in Astro.
--- import Header from './Header.svelte'; --- <Header [1]="Hello" />
bind:title which is for two-way binding.prop:title which is not valid syntax.Props are passed by naming them directly, like title="Hello".
Fix the error in the Astro code to correctly load a Svelte component only when the page is idle.
--- import Footer from './Footer.svelte'; --- <Footer [1] />
client:load which loads immediately.client:only which loads on client but not delayed.The client:idle directive loads the component when the browser is idle.
Fill both blanks to import and use a Svelte component named 'Button' with client-side only rendering.
--- import [1] from './Button.svelte'; --- <[2] client:only />
client:only directive.The import name and the component tag must match exactly, here 'Button'.
Fill all three blanks to pass a 'label' prop with value 'Click me' and load the Svelte component 'Clickable' only on client load.
--- import [1] from './Clickable.svelte'; --- <[2] [3]="Click me" client:load />
Import and use the component with the same name 'Clickable' and pass the prop 'label'.