0๐
โ
I figured it out. For anyone else looking, the only thing I did was put the dispatch
function in the fetch
function. And the head
stayed the same.
async fetch({ store, params }) {
const response = await axios.get(
'http://example.com/item/' + params.id + '/'
)
store.commit('mixedResponse', response)
},
Source:stackexchange.com