website-v2
website-v2 copied to clipboard
[Doc] Add info about Vuex store
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).