]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: remove confusing example
authorEduardo San Martin Morote <posva13@gmail.com>
Wed, 4 May 2022 12:43:16 +0000 (14:43 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Wed, 4 May 2022 12:43:16 +0000 (14:43 +0200)
See #1204

packages/docs/core-concepts/state.md

index 14e149b94594c958217c0bdf1d296986e36c246d..ba17daf78b342d9b4c9231c504f8dc779b9376db 100644 (file)
@@ -69,28 +69,7 @@ const useCounterStore = defineStore('counterStore', {
 })
 ```
 
-### With `setup()`
-
-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!
-
-```js
-import { useCounterStore } from '../stores/counterStore'
-
-export default {
-  setup() {
-    const counterStore = useCounterStore()
-
-    return { counterStore }
-  },
-  computed: {
-    tripleCounter() {
-      return this.counterStore.counter * 3
-    },
-  },
-}
-```
-
-### Without `setup()`
+#### Without `setup()`
 
 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: