Complete the code to create a simple Astro component that renders a heading.
---
// This is an Astro component
---
<h1>[1]Hello, Astro!</h1>The heading should start with 'Welcome to' to greet the user clearly.
Complete the code to add a client directive that prevents JavaScript from loading.
<MyComponent client:[1] />The client:none directive tells Astro not to ship any JavaScript for this component.
Fix the error in the Astro component to ensure zero JavaScript is shipped by default.
--- import Button from '../components/Button.astro'; --- <Button client:[1] />
Using client:none ensures no JavaScript is shipped for the Button component.
Fill both blanks to complete the Astro component that renders static content without JavaScript.
--- const message = 'Astro ships zero JavaScript by default'; --- <p>[1] [2]</p>
The variable message holds the first part, and the string explains why Astro ships zero JavaScript.
Fill all three blanks to create an Astro component that explains zero JavaScript shipping with a static list.
--- const reasons = [[1], [2], [3]]; --- <ul> {reasons.map(reason => <li>{reason}</li>)} </ul>
The reasons array lists why Astro ships zero JavaScript: default avoidance, static HTML rendering, and partial hydration.
