From 0789f6f250be49814dc7703cf287d84d29e8817a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nazar=C3=A9=20da=20Piedade?= <31008635+nazarepiedady@users.noreply.github.com> Date: Thu, 14 Dec 2023 12:59:27 +0100 Subject: [PATCH] docs: update links to vue docs (#2522) * docs: update link to the docs of methods of vue * docs: update link to the docs of reactive of vue --- packages/docs/core-concepts/actions.md | 4 ++-- packages/docs/core-concepts/plugins.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/docs/core-concepts/actions.md b/packages/docs/core-concepts/actions.md index 41dd607cb3..735b207684 100644 --- a/packages/docs/core-concepts/actions.md +++ b/packages/docs/core-concepts/actions.md @@ -5,7 +5,7 @@ title="Learn all about actions in Pinia" /> -Actions are the equivalent of [methods](https://v3.vuejs.org/guide/data-methods.html#methods) in components. They can be defined with the `actions` property in `defineStore()` and **they are perfect to define business logic**: +Actions are the equivalent of [methods](https://vuejs.org/api/options-state.html#methods) in components. They can be defined with the `actions` property in `defineStore()` and **they are perfect to define business logic**: ```js export const useCounterStore = defineStore('counter', { @@ -166,7 +166,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` handles promises and allows you to execute a function after the action resolves. In a similar way, `onError` allows you to 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). +It is possible to observe actions and their outcome with `store.$onAction()`. The callback passed to it is executed before the action itself. `after` handles promises and allows you to execute a function after the action resolves. In a similar way, `onError` allows you to 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://vuejs.org/guide/best-practices/production-deployment#tracking-runtime-errors). Here is an example that logs before running actions and after they resolve/reject. diff --git a/packages/docs/core-concepts/plugins.md b/packages/docs/core-concepts/plugins.md index 32b3fba296..a05f38cd69 100644 --- a/packages/docs/core-concepts/plugins.md +++ b/packages/docs/core-concepts/plugins.md @@ -84,7 +84,7 @@ pinia.use(({ store }) => { }) ``` -Note that every store is wrapped with [`reactive`](https://v3.vuejs.org/api/basic-reactivity.html#reactive), automatically unwrapping any Ref (`ref()`, `computed()`, ...) it contains: +Note that every store is wrapped with [`reactive`](https://vuejs.org/api/reactivity-core#reactive), automatically unwrapping any Ref (`ref()`, `computed()`, ...) it contains: ```js const sharedRef = ref('shared')