Skip to content

Commit

Permalink
docs: imports missing (#2636)
Browse files Browse the repository at this point in the history
* Update index.md

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 !!

* Update packages/docs/core-concepts/index.md [skip ci]

* Update packages/docs/core-concepts/index.md [skip ci]

* Update packages/docs/core-concepts/index.md [skip ci]

---------

Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com>
  • Loading branch information
HP8585 and posva committed Apr 16, 2024
1 parent b227a40 commit b61d9ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/docs/core-concepts/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ 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 @@ -125,6 +126,8 @@ Note that `store` is an object wrapped with `reactive`, meaning there is no need
```vue
<script setup>
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 b61d9ef

Please sign in to comment.