8000 Update actions.md (#338) · padcom/vuejs.org@bae8b0e · GitHub
[go: up one dir, main page]

Skip to content

Commit bae8b0e

Browse files
sebastiandedeynektsn
authored andcommitted
Update actions.md (vuejs#338)
1 parent 6cefef2 commit bae8b0e

File tree

1 fi 8000 le changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/en/actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const store = new Vuex.Store({
2525
})
2626
```
2727

28-
Action handlers receive a context object which exposes the same set of methods/properties on the store instance, so you can call `ctx.commit` to commit a mutation, or access the state and getters via `ctx.state` and `ctx.getters`. We will see why this context object is not the store instance itself when we introduce [Modules](modules.md) later.
28+
Action handlers receive a context object which exposes the same set of methods/properties on the store instance, so you can call `context.commit` to commit a mutation, or access the state and getters via `< 495D span class="pl-c1">context.state` and `context.getters`. We will see why this context object is not the store instance itself when we introduce [Modules](modules.md) later.
2929

3030
In practice, we often use ES2015 [argument destructuring](https://github.com/lukehoban/es6features#destructuring) to simplify the code a bit (especially when we need to call `commit` multiple times):
3131

0 commit comments

Comments
 (0)
0