]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: update after and onError
authorEduardo San Martin Morote <posva@users.noreply.github.com>
Thu, 27 Jan 2022 10:22:42 +0000 (11:22 +0100)
committerGitHub <noreply@github.com>
Thu, 27 Jan 2022 10:22:42 +0000 (11:22 +0100)
Close #995
Reason: 4dc1f1bec8f3db508c02fa6bdcc8203f280cbb3e

packages/docs/core-concepts/actions.md

index 338bbb773833864acb64a6cc4638f4b9dc7ab4c6..d6330edf8deff73ea000ca3e0292d48563cb1cd0 100644 (file)
@@ -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.