diff --git a/site/content/docs/01-component-format.md b/site/content/docs/01-component-format.md index 8eac5d3c50..09451701a0 100644 --- a/site/content/docs/01-component-format.md +++ b/site/content/docs/01-component-format.md @@ -130,6 +130,32 @@ Any top-level statement (i.e. not inside a block or a function) can be made reac --- +Only values which directly appear within the `$:` block will become dependencies of the reactive statement. For example, in the code below `total` will only update when `x` changes, but not `y`. + +```sv + + +Total: {total} + + + +``` + +--- + If a statement consists entirely of an assignment to an undeclared variable, Svelte will inject a `let` declaration on your behalf. ```sv