Merge pull request #2742 from sveltejs/TehShrike-js-label-syntax

Link to label syntax page on MDN
pull/7738/head
Rich Harris 6 years ago committed by GitHub
commit 2b59a331e7

@ -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 ```html
<script> <script>

Loading…
Cancel
Save