1👍
✅
useStore
is not a function from Pinia. This should be removed:
import { useStore } from "pinia";
When the docs mention creating a useStore function, that function is whatever you export from your store.js code. In your case it’s myStore
, though by convention it should be useMyStore
export const useMyStore = defineStore("myStore", { ... })
Then you import where needed
import { useMyStore } from 'store.js'
const store = useMyStore()
Source:stackexchange.com