Skip to content

Commit

Permalink
Update modules.md (vuejs#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
blake-newman authored and yyx990803 committed Oct 8, 2016
1 parent f0d439f commit 448866a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions docs/en/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,15 @@ store.state.b // -> moduleB's state

### Module Local State

Inside a module's mutations and getters, The first argument received will be **the module's local state** instead of root state:
Inside a module's mutations and getters, The first argument received will be **the module's local state**.

``` js
const moduleA = {
state: { count: 0 },
mutations: {
increment: (state, rootState) {
increment: (state) {
// state is the local module state
state.count++

// rootState is passed as the second argument, but you should not
// mutate it from within a module.
}
},

Expand Down

0 comments on commit 448866a

Please sign in to comment.