From c45e36e6f26390e67d8f16d21d72a01735a93aea Mon Sep 17 00:00:00 2001 From: Alexandre Plennevaux Date: Sun, 5 Jan 2020 03:20:12 +0100 Subject: [PATCH] Update 01-component-format.md The previous statement does not work (see https://github.com/sveltejs/svelte/issues/2510) I'm not able to fix it, so instead, let's just update the documentation :-) --- site/content/docs/01-component-format.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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`);