[Vuejs]-How to call function passed to vuex action function

0👍

In your vuex create a state called isLoading and also a mutation that updates the isLoading state. Once these are created inside your action you can use commit (isLoading, true) and after its finished isLoading(false).

You can then access isLoading in your component using a computed function, see the docs.

Leave a comment