I am getting warning:
app.js:87486 [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "likescount"
My Blade
<path-like-toggle likescount="{{$path->likeCount}}" isliked="{{$path->canBeunLiked()}}" path="{{$path->slug}}" type="{{$path->type}}" ></path-like-toggle>
Vue Code
props:['isliked','path','type','likescount']
,
methods:{
like () {
axios.post(`/${this.type}/${this.path}/like/`)
this.likingStatus = true;
this.likescount ++;
},
unlike () {
axios.post(`/${this.type}/${this.path}/unlike/`)
this.likingStatus = false;
this.likescount --;
},
}