Question 1
Consider the below Vue component and Vuex store definition.
const store = new Vuex.Store({ state : { stateA : 10, stateB : 20, stateC : 30, }}
Vue.component('Vuex-demo', { template : ` <div> state A : {{stateA}} state B : {{stateB}} state C : {{stateC}} </div> `, computed : code})Which of the following is the best suitable definition of the “code” placeholder in the above app (assuming the store is binded with the Vue app, and the mapState is imported appropriately)?
…mapState(['state_1', 'state_2', 'state_3'])
mapState(['state_1', 'state_2', 'state_3'])
Both …mapState(['state_1', 'state_2', 'state_3']) and mapState(['state_1', 'state_2', 'state_3'])
A Vue component cannot access Vuex store state.
