Currently, I have a component within my vue.js application that looks like this:
export default {
props: ['forums'],
methods: {
increment(forum, index) {
ForumService.increment(forum)
.then(() => {
this.forums.splice(index -1, 2, this.forums[index], this.forums[index -1]);
});
},
}
}
However, when attempting to increment using:
<i class="material-icons" @click="increment(forum)"></i>
The prop forums
ends up becoming null (which is visible in the vue devtools). Is there a solution to resolve this issue?