Skip to content

Commit 0d5a190

Browse files
authored
Adjust code block according to example (#4197)
* Adjust code block according to example * Update start-here.md
1 parent faf1430 commit 0d5a190

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/docs/src/en/start-here.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ When a `click` event happens, Alpine will call the associated JavaScript express
9696
### Reacting to changes
9797

9898
```alpine
99-
<h1 x-text="count"></h1>
99+
<span x-text="count"></span>
100100
```
101101

102102
`x-text` is an Alpine directive you can use to set the text content of an element to the result of a JavaScript expression.
103103

104-
In this case, we're telling Alpine to always make sure that the contents of this `h1` tag reflect the value of the `count` property.
104+
In this case, we're telling Alpine to always make sure that the contents of this `span` tag reflect the value of the `count` property.
105105

106-
In case it's not clear, `x-text`, like most directives accepts a plain JavaScript expression as an argument. So for example, you could instead set its contents to: `x-text="count * 2"` and the text content of the `h1` will now always be 2 times the value of `count`.
106+
In case it's not clear, `x-text`, like most directives accepts a plain JavaScript expression as an argument. So for example, you could instead set its contents to: `x-text="count * 2"` and the text content of the `span` will now always be 2 times the value of `count`.
107107

108108
[→ Read more about `x-text`](/directives/text)
109109

0 commit comments

Comments
 (0)