Vuex Action Init (Starting Your State)
Initiate Vuex State and Module State
Motivation
I found to initiate state for a Vuex store and Vuex store module is quite awkard and a solution was needed. The library is designed to initiate the store and modules store in Vuex.
- add a check for an INIT action
- When INIT found run before anything else
- When INIT found in SSR have it load before anything else
Install
npm install vuex-action-init --save
Usage
Use in a Vue App
INIT method is called during load
Vue const store = actions: { console } plugins: el: '#app' store