Nuxt-module state manager for vuex actions.
Keeps track of your actions (dispatch methods):
-
initial
action has not yet been called. -
pending
at least one action call not yet completed. -
done
all action calls have been completed.
Also works in conjunction with vue-devtools.
yarn add vuex-actions-states
// or
npm install vuex-actions-states
In nuxt.config.js
{
...otherImportantNuxtConfigStuff,
modules: [
[ 'vuex-actions-states']
]
}
An $actions
object is globally accessible via this
in components or $nuxt
.
###$actions.initial(actionName: String | String[])
String
: returns true if action has not been called yet.
String[]
: returns true if at least one action has not been called yet.
###$actions.pending(actionName: String | String[])
String
: returns true if action has not been completed yet.
String[]
: returns true if at least one action has not been completed yet.
###$actions.done(actionName: String | String[])
String
: returns true if action has not been completed yet.
String[]
: returns true if at least one action has not been completed yet.
###$actions.states
Returns vuex-store state.
Also accessed via this.$store.actionsStates.state
Defaults to actionStates
.
Name for vuex store module.
Defaults to setActionType
.
Name for vuex store mutation.
(note: most use cases can ignore options)