Skip to content

Commit

Permalink
docs: Update README.md (#520)
Browse files Browse the repository at this point in the history
* Update README.md

docs: 04-updating-arrays-and-objects, add `let obj = { foo: { bar: 'old' } };` for more clarity

* Apply suggestions from code review

---------

Co-authored-by: Rich Harris <[email protected]>
  • Loading branch information
matzar and Rich-Harris authored Dec 15, 2023
1 parent 511d1b2 commit da3e539
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ A simple rule of thumb: the name of the updated variable must appear on the left

```js
/// no-file
const obj = { foo: { bar: 1 } };
const foo = obj.foo;
foo.bar = 'baz';
foo.bar = 2;
```

...won't trigger reactivity on `obj.foo.bar`, unless you follow it up with `obj = obj`.

1 comment on commit da3e539

@vercel
Copy link

@vercel vercel bot commented on da3e539 Dec 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.