Skip to content

Access Pinia Store globally #739

Oct 22, 2021 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

You can call useOtherStore() inside of your store:

defineStore('a', () => {
  const other = useOtherStore()
})

or https://pinia.esm.dev/core-concepts/getters.html#accessing-other-stores-getters for options api

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by posva
Comment options

You must be logged in to vote
3 replies
@posva
Comment options

@sdoerger
Comment options

@posva
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants