Skip to content

Commit 98c76ec

Browse files
committed
Merge branch 'master' of https://github.com/SrZorro/svelte into SrZorro-master
2 parents 0f602a1 + 05e259c commit 98c76ec

File tree

1 file changed

+9
-0
lines changed
  • site/content/tutorial/02-reactivity/04-updating-arrays-and-objects

1 file changed

+9
-0
lines changed

site/content/tutorial/02-reactivity/04-updating-arrays-and-objects/text.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,12 @@ function addNumber() {
3030
numbers[numbers.length] = numbers.length + 1;
3131
}
3232
```
33+
As a rule of thumb _The name of the reactive variable must appear on the left side of the equals to react to assignments._
34+
35+
For example, this case wouldn't work:
36+
```js
37+
const childRef = obj.foo;
38+
childRef.bar = "new value";
39+
```
40+
41+
And to make it work it would be needed to force an update to object with `obj = obj`.

0 commit comments

Comments
 (0)