0👍
✅
Assuming you use something like axios, you should create something like this
loadMore () {
if (this.morePagesAvailable) {
this.page += 1
...
this.loadMoreText = 'Loading'
this.clicked = true
Axios.get(...).then( resp => {
//use the resp
this.clicked = false
})
return this.loadMoreText
}
}
Also you should probably rename clicked to isLoading.
Source:stackexchange.com