Skip to content

Commit aea1c3f

Browse files
authored
docs: update after and onError
Close #995 Reason: 4dc1f1b
1 parent bfd231b commit aea1c3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/docs/core-concepts/actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export default {
120120

121121
## Subscribing to actions
122122

123-
It is possible to observe actions and their outcome with `store.$onAction()`. The callback passed to it is executed before the action itself. `after` handle promises and allows you to change the returned value of the action. `onError` allows you to stop the error from propagating. These are useful for tracking errors at runtime, similar to [this tip in the Vue docs](https://v3.vuejs.org/guide/tooling/deployment.html#tracking-runtime-errors).
123+
It is possible to observe actions and their outcome with `store.$onAction()`. The callback passed to it is executed before the action itself. `after` handle promises and allows you to execute a function after the action resolves. In a similar way, `onError` allows you execute a function if the action throws or rejects. These are useful for tracking errors at runtime, similar to [this tip in the Vue docs](https://v3.vuejs.org/guide/tooling/deployment.html#tracking-runtime-errors).
124124

125125
Here is an example that logs before running actions and after they resolve/reject.
126126

0 commit comments

Comments
 (0)