Question 10
Consider the following Vue 2 code with Vuex 3 used via CDN, assume the Vuex store is correctly injected into the Vue instance.
Filename: store.js
export default store = new Vuex.Store({ state: { score: 10, }, mutations: { increaseScore(state) { state.score += 5; }, }, actions: { increaseScoreAsync({ commit }) { setTimeout(() => { commit("increaseScore"); }, 1000); }, },});Filename: score-display.js
export default Vue.component('score-display', { template: ` <div> <p>Current Score: {{ score }}</p> <button @click="boostNow">Boost Now</button> <button @click="boostLater">Boost After 1s</button> </div> `, computed: { score() { // CODE 1 } }, methods: { boostNow() { // CODE 2 }, boostLater() { // CODE 3 } }});Which of the following correctly fills in CODE 1, CODE 2, and CODE 3 for the score to be displayed and for the boostNow() and boostLater() methods to work correctly?