From 7b78fd6f8bd13db82c22ca677f31eeba8a4dd712 Mon Sep 17 00:00:00 2001 From: stephane-vanraes Date: Thu, 22 Jul 2021 07:50:19 +0200 Subject: [PATCH] update docs on reactivity --- site/content/docs/01-component-format.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/site/content/docs/01-component-format.md b/site/content/docs/01-component-format.md index eafcd8963e..546715eb56 100644 --- a/site/content/docs/01-component-format.md +++ b/site/content/docs/01-component-format.md @@ -95,8 +95,6 @@ To change component state and trigger a re-render, just assign to a locally decl Update expressions (`count += 1`) and property assignments (`obj.x = y`) have the same effect. -Because Svelte's reactivity is based on assignments, using array methods like `.push()` and `.splice()` won't automatically trigger updates. To trigger the update a subsequent assignment is required. This and more details can also be found in the [tutorial](tutorial/updating-arrays-and-objects). - ```sv ``` +--- + +Because Svelte's reactivity is based on assignments, using array methods like `.push()` and `.splice()` won't automatically trigger updates. A subsequent assignment is required to trigger the update. This and more details can also be found in the [tutorial](tutorial/updating-arrays-and-objects). + ```sv