I have a requirement to update the follow and unfollow button following an axios request.
<template>
<div v-if="isnot">
<a href="#" @click.prevent="unfellow" v-if="isfollowing" >unFellow</a>
<a href="#" @click.prevent="fellow" v-else >Fellow</a>
</div>
</template>
Here are my Methods:
fellow () {
axios.post(`/@${this.follower}/follow/`)
},
unfellow () {
axios.post(`/@${this.follower}/unfollow/`)
}