You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/api.md
+7-37Lines changed: 7 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,42 +20,12 @@ const store = new Vuex.Store({ ...options })
20
20
21
21
-**mutations**
22
22
23
-
- type: `Object | Array<Object>`
23
+
- type: `Object`
24
24
25
25
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.
26
26
27
-
If passing in an Array of Objects, these objects will be automatically merged together into one final object.
28
-
29
27
[Details](mutations.md)
30
28
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
-
59
29
-**middlewares**
60
30
61
31
- type: `Array<Object>`
@@ -89,18 +59,18 @@ const store = new Vuex.Store({ ...options })
89
59
90
60
The root state. Read only.
91
61
92
-
-**actions**
93
-
94
-
- type:`Object`
95
-
96
-
The callable action functions.
97
-
98
62
### Vuex.Store Instance Methods
99
63
100
64
-**dispatch(mutationName:String, ...args)**
101
65
102
66
Directly dispatch a mutation. This is useful in certain situations are in general you should prefer using actions in application code.
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
+
104
74
- **hotUpdate(newOptions:Object)**
105
75
106
76
Hot swap new actions and mutations. [Details](hot-reload.md)
0 commit comments