website-v2 icon indicating copy to clipboard operation
website-v2 copied to clipboard

[Doc] Add info about Vuex store

Open Mikaleb opened this issue 2 years ago • 0 comments

Hi,

I just saw something that is not documented at all in the doc at https://nuxtjs.org/docs/directory-structure/store/ :

When a file is in a folder's module, it's going to be interpreted as part of the store.

Example : create a file called whatever.js, instantiate your index.js normally : your new module state has the key whatever in it !

(The only problem I had was that i was including this file for a later use in a method, not to be interpreted, and not to be overriding my index.js file store).

Mikaleb avatar Nov 03 '21 11:11 Mikaleb