This question already has answers here:
Closed 2 years ago.
How can I use debounce
on an async
function? I have a method within my vue
-app which reveives data from an API which calls the API continuosly which I want to avoid.
Here is my method:
methods: {
async getAlbums () {
const response = await AlbumService.fetchAlbums()
this.albums = response.data.albums
}
}
I've installed lodash
previously so how can I achieve that?