Skip to content

Commit 6608fcf

Browse files
committed
[docs] api
1 parent 5f99904 commit 6608fcf

File tree

1 file changed

+7
-37
lines changed

1 file changed

+7
-37
lines changed

docs/en/api.md

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -20,42 +20,12 @@ const store = new Vuex.Store({ ...options })
2020

2121
- **mutations**
2222

23-
- type: `Object | Array<Object>`
23+
- type: `Object`
2424

2525
An object where each entry's key is the mutation name and the value is a mutation handler function. The handler function always receives `state` as the first argument, and receives all arguments passed to the dispatch call following that.
2626

27-
If passing in an Array of Objects, these objects will be automatically merged together into one final object.
28-
2927
[Details](mutations.md)
3028

31-
- **actions**
32-
33-
- type: `Object | Array<Object>`
34-
35-
An object where each entry's key is the action name and the value is either
36-
37-
1. A mutation name string; or
38-
2. A function which will receive the store as the first argument, followed by additional payload arguments.
39-
40-
Vuex will process these entries and create the actual callable action functions and expose them on the `actions` property of the store.
41-
42-
If passing in an Array of Objects, these objects will be automatically merged together into one final object.
43-
44-
[Details](actions.md)
45-
46-
47-
- **getters**
48-
49-
- type: `Object | Array<Object>`
50-
51-
An object where each entry's key is the getter name and the value of a function which will receive the state as the first argument.
52-
53-
Vuex will process these entries and create the actual callable getter functions and expose them on the `getters` property of the store.
54-
55-
If passing in an Array of Objects, these objects will be automatically merged together into one final object.
56-
57-
[Details](getters.md)
58-
5929
- **middlewares**
6030

6131
- type: `Array<Object>`
@@ -89,18 +59,18 @@ const store = new Vuex.Store({ ...options })
8959

9060
The root state. Read only.
9161

92-
- **actions**
93-
94-
- type: `Object`
95-
96-
The callable action functions.
97-
9862
### Vuex.Store Instance Methods
9963

10064
- **dispatch(mutationName: String, ...args)**
10165

10266
Directly dispatch a mutation. This is useful in certain situations are in general you should prefer using actions in application code.
10367

68+
- **watch(pathOrGetter: String|Function, cb: Function, [options: Object])**
69+
70+
Watch a path or a getter function's value, and call the callback when the value changes. Accepts an optional options object that takes the same options as Vue's `vm.$watch` method.
71+
72+
To stop watching, call the returned handle function.
73+
10474
- **hotUpdate(newOptions: Object)**
10575

10676
Hot swap new actions and mutations. [Details](hot-reload.md)

0 commit comments

Comments
 (0)