Skip to content

Commit 192dc34

Browse files
authored
docs: From the /packages/docs/core-concepts/getters.md documentation: (#1488)
- Fix old docs links not redirecting correctly. Fixed minor typos in the example code.
1 parent 240f784 commit 192dc34

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/docs/core-concepts/getters.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
title="Learn all about getters in Pinia"
66
/>
77

8-
Getters are exactly the equivalent of [computed values](https://v3.vuejs.org/guide/reactivity-computed-watchers.html#computed-values) for the state of a Store. They can be defined with the `getters` property in `defineStore()`. They receive the `state` as the first parameter **to encourage** the usage of arrow function:
8+
Getters are exactly the equivalent of [computed values](https://vuejs.org/guide/essentials/computed.html) for the state of a Store. They can be defined with the `getters` property in `defineStore()`. They receive the `state` as the first parameter **to encourage** the usage of arrow function:
99

1010
```js
1111
export const useStore = defineStore('main', {
@@ -177,7 +177,7 @@ For the following examples, you can assume the following store was created:
177177
// Example File Path:
178178
// ./src/stores/counterStore.js
179179

180-
import { defineStore } from 'pinia',
180+
import { defineStore } from 'pinia'
181181

182182
const useCounterStore = defineStore('counterStore', {
183183
state: () => ({
@@ -224,7 +224,7 @@ export default {
224224
computed: {
225225
// gives access to this.doubleCounter inside the component
226226
// same as reading from store.doubleCounter
227-
...mapState(useCounterStore, ['doubleCount'])
227+
...mapState(useCounterStore, ['doubleCount']),
228228
// same as above but registers it as this.myOwnName
229229
...mapState(useCounterStore, {
230230
myOwnName: 'doubleCounter',

0 commit comments

Comments
 (0)