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
+15Lines changed: 15 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -156,6 +156,21 @@ const store = new Vuex.Store({ ...options })
156
156
157
157
Most commonly used in plugins. [Details](plugins.md)
158
158
159
+
- **`subscribeAction(handler:Function)`**
160
+
161
+
> New in 2.5.0
162
+
163
+
Subscribe to store actions. The `handler` is called for every dispatched action and receives the action descriptor and current store state as arguments:
164
+
165
+
``` js
166
+
store.subscribeAction((action, state) => {
167
+
console.log(action.type)
168
+
console.log(action.payload)
169
+
})
170
+
```
171
+
172
+
Most commonly used in plugins. [Details](plugins.md)
0 commit comments