Is it possible to implement the debounce
function with an async
method? I have a specific scenario in my vue
-app where I am making continuous API calls within a method and I would like to prevent this.
This is the method in question:
methods: {
async getAlbums () {
const response = await AlbumService.fetchAlbums()
this.albums = response.data.albums
}
}
Given that I have previously installed lodash
, how can I utilize it to achieve this goal?