N
Nuxt3d ago
Thomas

module : Using store in component

Hello, I'm building a module and I have a component that loads data from the pinia store. I use the suggested syntax : const store = useStore(). Everything is working great on the dev playground app, but when I use my module with a new app, importing my component I have this error : 500 : useStore is not defined and the stack trace refer to my component
1 Reply
Thomas
Thomas3d ago
I just figured it out ! I needed to add : import { useStore } from '../stores/mystore'
Want results from more Discord servers?
Add your server