From f7d5892fa071425bd6cfb9f6501a3c7e5d2c82be Mon Sep 17 00:00:00 2001 From: Steven Huang Date: Wed, 20 Nov 2019 05:31:02 -0500 Subject: [PATCH] site: reactive statements, avoid infinite loops Add a blurb to describe how reactive statements can be configured to run only when certain values have changed. --- site/content/docs/01-component-format.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/site/content/docs/01-component-format.md b/site/content/docs/01-component-format.md index 3d349af51d..a464065eb3 100644 --- a/site/content/docs/01-component-format.md +++ b/site/content/docs/01-component-format.md @@ -130,6 +130,23 @@ Any top-level statement (i.e. not inside a block or a function) can be made reac --- +To avoid infinite loops, reactive statements can be configured to run only when certain values have changed. + +```html + +``` + +--- + If a statement consists entirely of an assignment to an undeclared variable, Svelte will inject a `let` declaration on your behalf. ```html