Update astro-components.md (#2181)
* Update astro-components.md be a little clearer right up front about what you can do I ran this code in stackBlitz minimal - which listed no renders. Note: I don't know enough yet about Astro to say why I could use React-style interpolation at compile time to insert a variable into the html -- so I can't add a phrase describing why it works... * Update docs/src/pages/core-concepts/astro-components.md Co-authored-by: Jonathan Neal <jonathantneal@hotmail.com>
This commit is contained in:
parent
6570a20442
commit
b9c5778d45
1 changed files with 1 additions and 1 deletions
|
@ -81,9 +81,9 @@ Remember that Astro is a server-side templating language, so your component scri
|
||||||
// Anything inside the `---` code fence is your component script.
|
// Anything inside the `---` code fence is your component script.
|
||||||
// This JavaScript code runs at build-time.
|
// This JavaScript code runs at build-time.
|
||||||
// See below to learn more about what you can do.
|
// See below to learn more about what you can do.
|
||||||
console.log('This runs at build-time, is visible in the CLI output');
|
|
||||||
// Tip: TypeScript is also supported out-of-the-box!
|
// Tip: TypeScript is also supported out-of-the-box!
|
||||||
const thisWorks: number = 42;
|
const thisWorks: number = 42;
|
||||||
|
console.log('This runs at build-time, is visible in the CLI output', thisWorks);
|
||||||
---
|
---
|
||||||
<div class="example-1">
|
<div class="example-1">
|
||||||
<h1>Hello world!</h1>
|
<h1>Hello world!</h1>
|
||||||
|
|
Loading…
Reference in a new issue