Recall & Review
beginner
What does the
client:load directive do in Astro?It tells Astro to load and run the component only after the page has fully loaded in the browser, ensuring the component runs on the client side after initial HTML is rendered.
Click to reveal answer
intermediate
When should you use
client:load instead of client:idle in Astro?Use
client:load when you want the component to load as soon as the page finishes loading, not waiting for the browser to be idle like client:idle does.Click to reveal answer
beginner
How does
client:load improve user experience compared to loading components immediately?It allows the main HTML to render first, so users see content quickly, then loads interactive parts after the page load, reducing blocking and improving perceived speed.
Click to reveal answer
beginner
Show the syntax to use
client:load with a React component in Astro.Example: <br>
<MyComponent client:load /> <br> This tells Astro to load MyComponent only after the page load event.Click to reveal answer
intermediate
What happens if you omit
client:load on a client component in Astro?The component will not hydrate or run on the client side automatically, so interactive features may not work until explicitly loaded with a directive.
Click to reveal answer
What event triggers a component with
client:load to load in Astro?✗ Incorrect
client:load waits for the page load event before loading the component on the client.Which directive loads a component only after the browser is idle?
✗ Incorrect
client:idle waits for the browser to be idle before loading the component.What is the main benefit of using
client:load in Astro?✗ Incorrect
client:load delays loading until after page load, improving perceived speed.How do you apply
client:load to a component in Astro?✗ Incorrect
The syntax is
<Component client:load /> to load after page load.If a component lacks any client directive in Astro, what happens?
✗ Incorrect
Without a client directive, the component renders static HTML but does not hydrate for interactivity.
Explain how the
client:load directive works in Astro and when you would use it.Think about when the component starts running in the browser.
You got /4 concepts.
Compare
client:load with client:idle in Astro and describe scenarios for each.Consider timing and user experience impact.
You got /4 concepts.