Skip to content

Fix/358 track typo #362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/guide/reactivity.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ Beyond a console log, we could do anything here we wish. We could even _not_ ret

Furthermore, there’s another feature Proxies offer us. Rather than just returning the value like this: `target[prop]`, we could take this a step further and use a feature called `Reflect`, which allows us to do proper `this` binding. It looks like this:

[//]: # 'TODO: line highlighting?'

```js
```js{7}
const dinner = {
meal: 'tacos'
}
Expand All @@ -114,9 +112,9 @@ console.log(proxy.meal)
// tacos
```

We mentioned before that in order to have an API that updates a final value when something changes, we’re going to have to set new values when something changes. We do this in the handler, in a function called `track`, where pass in the `target` and `key`.
We mentioned before that in order to have an API that updates a final value when something changes, we’re going to have to set new values when something changes. We do this in the handler, in a function called `track`, where we pass in the `target` and `key`.

```js
```js{7}
const dinner = {
meal: 'tacos'
}
Expand Down