Question 28
Consider the following Vuex module definition for managing a shopping cart.
const cartModule = { state: { items: [] }, mutations: { addItem(state, item) { state.items.push(item); }, }, actions: { async addToCart({ commit }, item) { // TODO: Implement adding item to cart }, },}Which of the following options correctly completes the code for the “addToCart” action function?