Static GitHub Issues

[1685] Access VUEX store inside of LAYOUT files

prev: <nuxt-link /> doesn't support click events
next: Flash of Unstyled Content (FOUC) is an actual problem

Hi guys, i've been having problems reading the $store object on the layout files, i want to know if this is because of design of VUE or it's just a feature that will be implemented.

I have the following vuetify app on my layout:

<v-app :dark="store.state.dark">...</v-app>

But i'm getting the following error: "Cannot read property 'state' of undefined"

If I try to modify the $store object. It is going to throw the same kind of error "Cannot read the property commit of undefined".

Is this a current limitation? An error? A technical decision?

(For Writing on the STORE: I had to create a component and reference the store from the component)

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1510">#c1510</a>)</em></sub></div>