Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading "HTML-only" in component intro #9395

Closed
thetillhoff opened this issue Sep 13, 2024 · 1 comment
Closed

Misleading "HTML-only" in component intro #9395

thetillhoff opened this issue Sep 13, 2024 · 1 comment
Labels
improve documentation Enhance existing documentation (e.g. add an example, improve description)

Comments

@thetillhoff
Copy link

📚 Subject area/topic

Components

📋 Page(s) affected (or suggested, for new content)

https://docs.astro.build/en/basics/astro-components/

📋 Description of content that is out-of-date or incorrect

Right at the start it says (emphasis mine)

Astro components are the basic building blocks of any Astro project. They are HTML-only templating components with no client-side runtime.

A bit further down on the same page, "Component Script" is introduced:

---
// Component Script (JavaScript)
---
<!-- Component Template (HTML + JS Expressions) -->

So the "HTML-only" is misleading IMO.

🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)

No response

@thetillhoff thetillhoff added the improve documentation Enhance existing documentation (e.g. add an example, improve description) label Sep 13, 2024
@thetillhoff thetillhoff changed the title Misleading "html only" in component intro Misleading "HTML-only" in component intro Sep 13, 2024
@sarah11918
Copy link
Member

Hi! We use this phrase so that it's clear that your Astro component creates a template that builds to plain HTML. What is special about Astro is that you can use JS expressions in order to build that template, but these expressions are evaluated at build time only, and then the Astro component renders to static HTML. We have found this description helps people avoid the confusion that they should be expecting interactivity or reactivity in their site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improve documentation Enhance existing documentation (e.g. add an example, improve description)
Projects
None yet
Development

No branches or pull requests

2 participants