From aea1c3f3176dec9167df86c318ed42d2df76691a Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Thu, 27 Jan 2022 11:22:42 +0100 Subject: [PATCH] docs: update after and onError Close #995 Reason: 4dc1f1bec8f3db508c02fa6bdcc8203f280cbb3e --- packages/docs/core-concepts/actions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docs/core-concepts/actions.md b/packages/docs/core-concepts/actions.md index 338bbb77..d6330edf 100644 --- a/packages/docs/core-concepts/actions.md +++ b/packages/docs/core-concepts/actions.md @@ -120,7 +120,7 @@ export default { ## Subscribing to actions -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). +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). Here is an example that logs before running actions and after they resolve/reject. -- 2.47.3