Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to access store context when using composable stores #2043

Closed
Fl0r14n opened this issue Mar 1, 2023 · 1 comment
Closed

Ability to access store context when using composable stores #2043

Fl0r14n opened this issue Mar 1, 2023 · 1 comment

Comments

@Fl0r14n
Copy link

Fl0r14n commented Mar 1, 2023

What problem is this solving

There is no way to access the plugins when defining stores using composable stores, though they are present when using the store

Proposed solution

const pinia = createPinia().use(({ store }) => {
store.router = markRaw(router)
})

const useMyStore = defineStore('MyStore', storeContext => {
const {router} = storeContext
console.log(router)
return {router}
})

Describe alternatives you've considered

No response

@posva
Copy link
Member

posva commented Mar 1, 2023

Duplicate of #1784

@posva posva marked this as a duplicate of #1784 Mar 1, 2023
@posva posva closed this as not planned Won't fix, can't repro, duplicate, stale Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants