Skip to content

Commit 3582c43

Browse files
authored
Link to label syntax page on MDN
Inspired by sveltejs/svelte#98 (comment) , I wanted to make it a bit more explicit that the `$:` label was actual JS syntax.
1 parent 5279182 commit 3582c43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/01-component-format.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Because Svelte's reactivity is based on assignments, using array methods like `.
8989

9090
---
9191

92-
Any top-level statement (i.e. not inside a block or a function) can be made reactive by prefixing it with the `$:` label. Reactive statements run immediately before the component updates, whenever the values that they depend on have changed.
92+
Any top-level statement (i.e. not inside a block or a function) can be made reactive by prefixing it with the `$:` [JS label syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/label). Reactive statements run immediately before the component updates, whenever the values that they depend on have changed.
9393

9494
```html
9595
<script>

0 commit comments

Comments
 (0)