The easiest way to use your Vuex store between all processes (including main).
⭐ Persisted state
⭐ Shared mutations
Installation of the Vuex Electron easy as 1-2-3.
-
Install package with using of yarn or npm:
yarn install vuex-electronor
npm install vuex-electron -
Include plugins in your Vuex store::
import Vue from "vue" import Vuex from "vuex" import { createPersistedState, createSharedMutations } from "vuex-electron" Vue.use(Vuex) export default new Vuex.Store({ // ... plugins: [ createPersistedState(), createSharedMutations() ], // ... })
-
Well done you did it! The last step is to add the star to this repo 😄
For proper work of the package, you shouldn't use
store.commitoutside of actions.
Available options for createPersistedState()
createPersistedState({
whitelist: ["whitelistedAction", "anotherWhitelistedAction"],
// or
whitelist: (mutation) => {
return true
},
// or
blacklist: ["ignoredAction", "anotherIgnoredAction"],
// or
blacklist: (mutation) => {
return true
}
})- Configure ESLint and Prettier
- Configure Travis CI and CodeClimate
- Minify package
- Write tests
- Write docs