Skip to content

Commit 844cb43

Browse files
Alex-Sokolovchrisvfritz
authored andcommitted
Update index.md (vuejs#1036)
1 parent 1b65952 commit 844cb43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/v2/api/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ if (version === 2) {
705705

706706
## Options / Lifecycle Hooks
707707

708-
All lifecycle hooks automatically have their `this` context bound to the instance, so that you can access data, computed properties, and methods. This means __you should not use an arrow function to define a lifecycle method__ (e.g. `created: () => this.fetchTodos()`). The reason is arrow functions bind the parent context, so `this` will not be the Vue instance as you expect and `this.fetchTodos` will be undefined.
708+
<p class="tip">All lifecycle hooks automatically have their `this` context bound to the instance, so that you can access data, computed properties, and methods. This means __you should not use an arrow function to define a lifecycle method__ (e.g. `created: () => this.fetchTodos()`). The reason is arrow functions bind the parent context, so `this` will not be the Vue instance as you expect and `this.fetchTodos` will be undefined.</p>
709709

710710
### beforeCreate
711711

0 commit comments

Comments
 (0)