Skip to content

Astro Framework

Notes

  • Astro components are the basic building blocks of any Astro project. They are HTML-only templating components with no client-side runtime.
  • Astro components structure: component script and component template
  • component script:
    • on the top, fenced by --- syntax.
    • everything between the fences runs on the server, and rendered to clients
  • for type script, you need to export Props interface from astro component, so Astro can infer the type of props.