I\'m looking for a simple solution for the following problem:
I have a Vue component button with which I can make an ajax request. I would like to disable this butto
State.js:
state: { pendingRequest: false }, actions: { fetchRequest: async function(context) { context.state.pendingRequest = true let req = await fetch(url) let data = await req.json() context.state.pendingRequest = false } }
Component.vue:
Button