https://github.com/james2doyle/vuex-crosstab
CrossTab syncs Vuex state across same-origin tabs
https://github.com/james2doyle/vuex-crosstab
Last synced: about 2 months ago
JSON representation
CrossTab syncs Vuex state across same-origin tabs
- Host: GitHub
- URL: https://github.com/james2doyle/vuex-crosstab
- Owner: james2doyle
- License: other
- Created: 2020-07-04T03:03:11.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-05T18:14:05.000Z (almost 6 years ago)
- Last Synced: 2025-11-18T14:36:36.837Z (7 months ago)
- Language: JavaScript
- Size: 382 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vuex CrossTab
> CrossTab syncs Vuex state across same-origin tabs
Inspired by [storeon/crosstab](https://github.com/storeon/crosstab).
## Demo

They way it works is that it tracks your mutations and replays them in other open tabs on the same domain origin.
## Installation
* `npm install --save vuex-crosstab`
```js
// es6
// import CrossTab from 'vuex-crosstab';
// commonjs
const CrossTab = require('vuex-crosstab');
export default new Vuex.Store({
// ...
plugins: [
// your other plugins...
CrossTab({ recover: true })
],
// ...
});
```
## Options
* `config.key`: the storage key to use. default = `"vuex-crosstab"`
* `config.recover`: if old state should be recovered on load. default = false
* `config.filter`: a filter function for ignoring events. default = null
## License
[LICENSE](LICENSE)