Astro allows you to build your website with your favorite framework and even multiple frameworks at the same time.
Welcome to Directives
Template directives are a special kind of HTML attribute available inside of any Astro component template (.astro files), and some can also be used in .mdx files.
Template directives are used to control an element or component’s behavior in some way
Here are some example for client directives.
client:idle - Will wait until the browser is idle to render it, this is used when the component is not a high priority.
client:visible - Will be rendered until its visible to the end-user.
For more about client-directives here
Picture Resource: https://www.nationalgeographic.com/travel/slideshow/paid-content-the-philippines-an-archipelago-of-unique-scenery
Building your first Atro Project
npm create astro@latest
Inside the project, you will find the pages directory, here it's the router configuration of the website. Every page is defined as an Astro component, inside of it you can write static HTML or declare components that maybe be written in React/Vue or any framework.
To add React to your website, follow the following steps from the official documentation here.
Top comments (0)