Answer the question
In order to leave comments, you need to log in
How to remove one element from an array in Vuex?
There is an array
state.test.questionsin Vux.
removeQuestion(state,index) {
let questions = state.test.questions
questions.splice(index, 1)
state.test = {
...state.test,
questions:questions,
};
}
let questions = state.test.questions
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question