Problems with Vuex in a Typescript + Composition API project
Hello, I’m having some problems accessing my Vuex store, specifically through the composition API, and would appreciate any help.
The file structure for my store is this:
This is my root index.ts file:
Assuming that’s set up properly, I want to access my store inside a Vue component. I’m using the composition API, and the Vuex docs suggest something like this:
But this gives me an error:
Module '"vuex"' has no exported member 'useStore'. Did you mean to use 'import useStore from "vuex"' instead?Vetur(2614)
Does anyone have any pointers? Or even an example quasar project with typescript and the composition API that I could look at?
dobbel last edited by
Module ‘“vuex”’ has no exported member ‘useStore’. Did you mean to use 'import useStore from “vuex”
See this thread for a solution: