Vuex Tutorial #3 - Setting up a Central Store 정보
Vue Vuex Tutorial #3 - Setting up a Central Store
본문
Setting up a Central https://vuex.vuejs.org/kr/guide/state.html
npm install vuex --save
store 디렉토리 안에..
store.js
import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);
export const store = new Vuex.Store({
state: {
products: [
{name: 'Banana Skin', price: 20},
{name: 'Shiny Star', price: 40},
{name: 'Green Shells', price: 60},
{name: 'Red Shells', price: 80}
]
}
});
https://github.com/iamshaunjp/vuex-playlist/tree/lesson-03
추천
0
0
댓글 0개