diff --git a/site/content/docs/01-component-format.md b/site/content/docs/01-component-format.md index 3d349af51d..a60d64b711 100644 --- a/site/content/docs/01-component-format.md +++ b/site/content/docs/01-component-format.md @@ -119,7 +119,9 @@ Any top-level statement (i.e. not inside a block or a function) can be made reac // this will update `document.title` whenever // the `title` prop changes - $: document.title = title; + $: { + document.title = title; + } $: { console.log(`multiple statements can be combined`);