Skip to content

Commit f91fef0

Browse files
committed
mention bindings in template strings
1 parent 4ac618c commit f91fef0

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/content/docs/config/reactivity.md

+18
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ or setup a `hook`.
77
A `Binding` is just an object that holds information for widget constructors
88
to setup a listener.
99

10+
:::caution
11+
`Binding` is a regular JavaScript object,
12+
it cannot be used in template strings
13+
14+
```js
15+
const label = Variable("hello")
16+
17+
Label({
18+
// [Object object] world
19+
label: `${label.bind()} world`,
20+
21+
// hello world
22+
label: label.bind().as(hello => `${hello} world`)
23+
})
24+
```
25+
26+
:::
27+
1028
## Property Bindings
1129

1230
We can make a `Binding` from a Variable

0 commit comments

Comments
 (0)