Skip to content

Commit 9cd76e7

Browse files
committed
docs: remove confusing example
See #1204
1 parent 3c66f5d commit 9cd76e7

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

packages/docs/core-concepts/state.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -69,28 +69,7 @@ const useCounterStore = defineStore('counterStore', {
6969
})
7070
```
7171

72-
### With `setup()`
73-
74-
While Composition API is not for everyone, the `setup()` hook can make using Pinia easier to work with in the Options API. No extra map helper functions needed!
75-
76-
```js
77-
import { useCounterStore } from '../stores/counterStore'
78-
79-
export default {
80-
setup() {
81-
const counterStore = useCounterStore()
82-
83-
return { counterStore }
84-
},
85-
computed: {
86-
tripleCounter() {
87-
return this.counterStore.counter * 3
88-
},
89-
},
90-
}
91-
```
92-
93-
### Without `setup()`
72+
#### Without `setup()`
9473

9574
If you are not using the Composition API, and you are using `computed`, `methods`, ..., you can use the `mapState()` helper to map state properties as readonly computed properties:
9675

0 commit comments

Comments
 (0)