I am building a vuejs app with webpack, vuex and vue-router.
My Project structure looks like this:
[components]
- BlockingLayer.vue
[store]
- index.js
[restapi]
- index.js
App.vue
main.js
I'm using BlockingLayer.vue inside of App.vue. App.vue has methods to show/hide BlockingLayer.
Now I want to be able to trigger those methods from the [restapi] index.js - how do I do that?
I tried importing App.vue inside my restapi module - doesn't work. Meanwhile importing store inside restapi works flawlessly. Importing restapi inside store and using it there also works just fine. What I could do is using a variable inside the store instead of inside App.vue to show/hide the BlockingLayer I guess, but that's not really what store is meant to be used for I would say...