Skip to content

Commit

Permalink
Update index.md
Browse files Browse the repository at this point in the history
hey brother, you forgot to import define store from pinia and also computed from vue, with all due respect, apologize for the yesterday I just wanna help to make the pinia package perfect and seamless !!
  • Loading branch information
HP8585 authored Apr 4, 2024
1 parent f550c60 commit 082fe6c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/docs/core-concepts/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ Setup stores are also able to rely on globally _provided_ properties like the Ro
```ts
import { inject } from 'vue'
import { useRoute } from 'vue-router'
import { defineStore } from 'pinia'


export const useSearchFilters = defineStore('search-filters', () => {
const route = useRoute()
Expand Down Expand Up @@ -124,7 +126,10 @@ Note that `store` is an object wrapped with `reactive`, meaning there is no need

```vue
<script setup>
import { useCounterStore } from '@/stores/counter'
import { useCounterStore } from '@/stores/counter';
import { computed } from 'vue';
const store = useCounterStore()
// ❌ This won't work because it breaks reactivity
// it's the same as destructuring from `props`
Expand Down

0 comments on commit 082fe6c

Please sign in to comment.