Skip to content

Commit

Permalink
Link to label syntax page on MDN
Browse files Browse the repository at this point in the history
Inspired by sveltejs/svelte#98 (comment) , I wanted to make it a bit more explicit that the `$:` label was actual JS syntax.
  • Loading branch information
TehShrike committed May 12, 2019
1 parent 5279182 commit 3582c43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/docs/01-component-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Because Svelte's reactivity is based on assignments, using array methods like `.

---

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.
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.

```html
<script>
Expand Down

0 comments on commit 3582c43

Please sign in to comment.