Created
March 15, 2019 20:49
-
-
Save pablocattaneo/fba4aa7339d6039fca06417ad24e665e to your computer and use it in GitHub Desktop.
If you are using the Modules mode of the Vuex store, only the primary module (in store/index.js) will receive this action. You'll need to chain your module actions from there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const state = () => ({ | |
categories: [] | |
}); | |
export const mutations = { | |
setCategories(state) { | |
state.categories = [ | |
"Pablo", | |
"Automotor", | |
"Compras", | |
"Vinotecas y bodegas", | |
"Cuidado Personal", | |
"Educación", | |
"Electro & Tecnología", | |
"Entretenimiento", | |
"Espectáculos", | |
"Gastronomía", | |
"Heladerías", | |
"Hogar", | |
"Jugueterías", | |
"Mascotas", | |
"Moda", | |
"Supermercado", | |
"Viajes y Turismo" | |
]; | |
} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const actions = { | |
nuxtServerInit({ commit }) { | |
commit("categories/setCategories"); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment