From 5ebde551b2daaa716dca9afd43d82928c1bec9e1 Mon Sep 17 00:00:00 2001 From: Josh Duff Date: Sun, 12 May 2019 06:16:30 -0500 Subject: [PATCH] Link to label syntax page on MDN Inspired by https://github.com/sveltejs/svelte/issues/98#issuecomment-491586072 , I wanted to make it a bit more explicit that the `$:` label was actual JS syntax. --- site/content/docs/01-component-format.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/docs/01-component-format.md b/site/content/docs/01-component-format.md index 356fa1170dea..1472ff3d6cc4 100644 --- a/site/content/docs/01-component-format.md +++ b/site/content/docs/01-component-format.md @@ -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