Skip to content

Commit 3755a20

Browse files
committed
clarify value of this for arrow functions
1 parent afc3d30 commit 3755a20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/v2/api/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ type: api
460460
})
461461
```
462462

463-
Note that if you use an arrow function with the `data` property, `this` will be undefined, but you can still access the instance as the function's first argument:
463+
Note that if you use an arrow function with the `data` property, `this` won't be the component's instance, but you can still access the instance as the function's first argument:
464464

465465
```js
466466
data: vm => ({ a: vm.myProp })
@@ -537,7 +537,7 @@ type: api
537537

538538
Computed properties to be mixed into the Vue instance. All getters and setters have their `this` context automatically bound to the Vue instance.
539539

540-
Note that if you use an arrow function with a computed property, `this` will be undefined, but you can still access the instance as the function's first argument:
540+
Note that if you use an arrow function with a computed property, `this` won't be the component's instance, but you can still access the instance as the function's first argument:
541541

542542
```js
543543
computed: {

0 commit comments

Comments
 (0)