0๐
โ
If you choose to split your module into different files (for state, mutations, etc.), you should use the default export in each file instead of export const state
.
export default () => ({
templateDetails: {
name: 'love',
// ...
}
})
The syntax you are using in only good if you have a single file for your store module.
See documentation here.
Source:stackexchange.com