Vuex store state is undefined
//state.js
export const store = new Vuex.Store({
state :{
title :"Welcome in Vuex Tutorials By SK Islam"
}
});
Then in main.js please import the store in this way..
import {store} from "./store/state";
{store}// this is important..
In your store.js:
export default new Vuex.Store({
instead of export const store = new Vuex.Store({
Or as @dfsq said import {store} from './store';