Astro · Islands, endpoints and deployment
Add an interactive component
A client: directive hydrates a framework component. Without one, it renders as plain HTML with no JavaScript.
---
import Counter from "../components/Counter.jsx";
---
<Counter client:load />
<Counter client:visible /> <!-- hydrate when scrolled into view -->
More islands, endpoints and deployment commands
- Read environment variables
- Create an API endpoint
- Render on the server
- Render a page on demand
- Configure the site
All islands, endpoints and deployment commands · Astro cheatsheet