# vuex-electron-sync-state

> Vuex plugin for synchronizing the vuex state in each electron process.

Latest version **1.0.1** (published 2020-03-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install vuex-electron-sync-state
pnpm add vuex-electron-sync-state
yarn add vuex-electron-sync-state
bun add vuex-electron-sync-state
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-03-21 |
| First published | 2020-03-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | chenjietao |
| Maintainers | chenjietao |
| Keywords | vuex-electron, shared-mutations, vuex-sync-state, electron-sync-vuex |

## Links

- npm: https://www.npmjs.com/package/vuex-electron-sync-state
- Repository: https://github.com/chenjietao/vuex-electron-sync-state
- Homepage: https://github.com/chenjietao/vuex-electron-sync-state#readme
- Issues: https://github.com/chenjietao/vuex-electron-sync-state/issues
- npm.io page: https://npm.io/package/vuex-electron-sync-state

## Recent versions

- 1.0.1 (latest) — 2020-03-21
- 1.0.0 — 2020-03-21

## README

# vuex-electron-sync-state

Vuex plugin for synchronizing the vuex state in each electron process.

## Usage
```javascript
// src/renderer/store/index.js
import Vuex from 'vuex'
import syncStatePlugin from 'vuex-electron-sync-state'

const store = Vuex.Store({})

export default new Vuex.Store({
  state: {},
  mutations: {},
  actions: {},
  plugins: [
    syncStatePlugin
  ]
})
```

And you should import the store entry in main process.
```javascript
// src/main/main.js
import store from '../renderer/store/index'

...
```

## Notice

The actions logic will be executed in the dispatched process. The mutations logic will be executed in all process.

So you need to pay attention to which process the code logic will be executed in.

---
_Source: https://npm.io/package/vuex-electron-sync-state · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
