Skip to content

Commit 67f79dd

Browse files
authored
[docs] simplify template literals to string primitives (#6806)
1 parent 791e40d commit 67f79dd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

site/content/tutorial/02-reactivity/03-reactive-statements/app-b/App.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
let count = 0;
33
44
$: if (count >= 10) {
5-
alert(`count is dangerously high!`);
5+
alert('count is dangerously high!');
66
count = 9;
77
}
88

site/content/tutorial/02-reactivity/03-reactive-statements/text.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ title: Statements
55
We're not limited to declaring reactive *values* — we can also run arbitrary *statements* reactively. For example, we can log the value of `count` whenever it changes:
66

77
```js
8-
$: console.log(`the count is ${count}`);
8+
$: console.log('the count is ' + count);
99
```
1010

1111
You can easily group statements together with a block:
1212

1313
```js
1414
$: {
15-
console.log(`the count is ${count}`);
16-
alert(`I SAID THE COUNT IS ${count}`);
15+
console.log('the count is ' + count);
16+
alert('I SAID THE COUNT IS ' + count);
1717
}
1818
```
1919

2020
You can even put the `$:` in front of things like `if` blocks:
2121

2222
```js
2323
$: if (count >= 10) {
24-
alert(`count is dangerously high!`);
24+
alert('count is dangerously high!');
2525
count = 9;
2626
}
2727
```

0 commit comments

Comments
 (0)